Lines Matching refs:N1C

1599   ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);  in visitADD()  local
1600 if (N0C && N1C) in visitADD()
1601 return DAG.FoldConstantArithmetic(ISD::ADD, VT, N0C, N1C); in visitADD()
1607 if (N1C && N1C->isNullValue()) in visitADD()
1611 if (!LegalOperations && TLI.isOffsetFoldingLegal(GA) && N1C && in visitADD()
1613 return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT, in visitADD()
1615 (uint64_t)N1C->getSExtValue()); in visitADD()
1617 if (N1C && N0.getOpcode() == ISD::SUB) in visitADD()
1620 DAG.getConstant(N1C->getAPIntValue()+ in visitADD()
1761 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDC() local
1762 if (N0C && !N1C) in visitADDC()
1766 if (N1C && N1C->isNullValue()) in visitADDC()
1796 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDE() local
1797 if (N0C && !N1C) in visitADDE()
1841 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitSUB() local
1842 if (N0C && N1C) in visitSUB()
1843 return DAG.FoldConstantArithmetic(ISD::SUB, VT, N0C, N1C); in visitSUB()
1845 if (N1C) in visitSUB()
1847 DAG.getConstant(-N1C->getAPIntValue(), VT)); in visitSUB()
1899 if (N1C && GA->getOpcode() == ISD::GlobalAddress) in visitSUB()
1900 return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT, in visitSUB()
1902 (uint64_t)N1C->getSExtValue()); in visitSUB()
1943 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSUBC() local
1944 if (N1C && N1C->isNullValue()) in visitSUBC()
2101 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitSDIV() local
2102 if (N0C && N1C && !N1C->isNullValue()) in visitSDIV()
2103 return DAG.FoldConstantArithmetic(ISD::SDIV, VT, N0C, N1C); in visitSDIV()
2105 if (N1C && N1C->getAPIntValue() == 1LL) in visitSDIV()
2108 if (N1C && N1C->isAllOnesValue()) in visitSDIV()
2120 if (N1C && !N1C->isNullValue() && (N1C->getAPIntValue().isPowerOf2() || in visitSDIV()
2121 (-N1C->getAPIntValue()).isPowerOf2())) { in visitSDIV()
2132 unsigned lg2 = N1C->getAPIntValue().countTrailingZeros(); in visitSDIV()
2154 if (N1C->getAPIntValue().isNonNegative()) in visitSDIV()
2163 if (N1C && !TLI.isIntDivCheap()) { in visitSDIV()
2190 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitUDIV() local
2191 if (N0C && N1C && !N1C->isNullValue()) in visitUDIV()
2192 return DAG.FoldConstantArithmetic(ISD::UDIV, VT, N0C, N1C); in visitUDIV()
2194 if (N1C && N1C->getAPIntValue().isPowerOf2()) in visitUDIV()
2196 DAG.getConstant(N1C->getAPIntValue().logBase2(), in visitUDIV()
2214 if (N1C && !TLI.isIntDivCheap()) { in visitUDIV()
2236 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitSREM() local
2237 if (N0C && N1C && !N1C->isNullValue()) in visitSREM()
2238 return DAG.FoldConstantArithmetic(ISD::SREM, VT, N0C, N1C); in visitSREM()
2248 if (N1C && !N1C->isNullValue()) { in visitSREM()
2278 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitUREM() local
2279 if (N0C && N1C && !N1C->isNullValue()) in visitUREM()
2280 return DAG.FoldConstantArithmetic(ISD::UREM, VT, N0C, N1C); in visitUREM()
2282 if (N1C && !N1C->isNullValue() && N1C->getAPIntValue().isPowerOf2()) in visitUREM()
2284 DAG.getConstant(N1C->getAPIntValue()-1,VT)); in visitUREM()
2301 if (N1C && !N1C->isNullValue()) { in visitUREM()
2327 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitMULHS() local
2332 if (N1C && N1C->isNullValue()) in visitMULHS()
2335 if (N1C && N1C->getAPIntValue() == 1) in visitMULHS()
2365 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitMULHU() local
2370 if (N1C && N1C->isNullValue()) in visitMULHU()
2373 if (N1C && N1C->getAPIntValue() == 1) in visitMULHU()
2832 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitAND() local
2833 if (N0C && N1C) in visitAND()
2834 return DAG.FoldConstantArithmetic(ISD::AND, VT, N0C, N1C); in visitAND()
2840 if (N1C && N1C->isAllOnesValue()) in visitAND()
2844 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0), in visitAND()
2851 if (N1C && N0.getOpcode() == ISD::OR) in visitAND()
2853 if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue()) in visitAND()
2856 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) { in visitAND()
2858 APInt Mask = ~N1C->getAPIntValue(); in visitAND()
2982 if (N1C && (N0.getOpcode() == ISD::LOAD || in visitAND()
2991 uint32_t ActiveBits = N1C->getAPIntValue().getActiveBits(); in visitAND()
2992 if (ActiveBits > 0 && APIntOps::isMask(ActiveBits, N1C->getAPIntValue())){ in visitAND()
3104 if (N1C && N1C->getAPIntValue() == 0xffff && N0.getOpcode() == ISD::OR) { in visitAND()
3233 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement() local
3234 if (!N1C) in isBSwapHWordElement()
3238 switch (N1C->getZExtValue()) { in isBSwapHWordElement()
3549 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitOR() local
3550 if (N0C && N1C) in visitOR()
3551 return DAG.FoldConstantArithmetic(ISD::OR, VT, N0C, N1C); in visitOR()
3557 if (N1C && N1C->isNullValue()) in visitOR()
3560 if (N1C && N1C->isAllOnesValue()) in visitOR()
3563 if (N1C && DAG.MaskedValueIsZero(N0, ~N1C->getAPIntValue())) in visitOR()
3582 if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && in visitOR()
3585 if ((C1->getAPIntValue() & N1C->getAPIntValue()) != 0) { in visitOR()
3586 if (SDValue COR = DAG.FoldConstantArithmetic(ISD::OR, VT, N1C, C1)) in visitOR()
3892 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitXOR() local
3893 if (N0C && N1C) in visitXOR()
3894 return DAG.FoldConstantArithmetic(ISD::XOR, VT, N0C, N1C); in visitXOR()
3900 if (N1C && N1C->isNullValue()) in visitXOR()
3928 if (N1C && N1C->getAPIntValue() == 1 && N0.getOpcode() == ISD::ZERO_EXTEND && in visitXOR()
3939 if (N1C && N1C->getAPIntValue() == 1 && VT == MVT::i1 && in visitXOR()
3951 if (N1C && N1C->isAllOnesValue() && in visitXOR()
3971 if (N1C && N0.getOpcode() == ISD::XOR) { in visitXOR()
3976 DAG.getConstant(N1C->getAPIntValue() ^ in visitXOR()
3980 DAG.getConstant(N1C->getAPIntValue() ^ in visitXOR()
4006 if (auto *N1C = dyn_cast<ConstantSDNode>(N1.getNode())) in visitXOR() local
4009 if (N1C->isAllOnesValue() && ShlLHS->isOne()) in visitXOR()
4147 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSHL() local
4168 N1C = isConstOrConstSplat(N1); in visitSHL()
4175 if (N0C && N1C) in visitSHL()
4176 return DAG.FoldConstantArithmetic(ISD::SHL, VT, N0C, N1C); in visitSHL()
4181 if (N1C && N1C->getZExtValue() >= OpSizeInBits) in visitSHL()
4184 if (N1C && N1C->isNullValue()) in visitSHL()
4201 if (N1C && SimplifyDemandedBits(SDValue(N, 0))) in visitSHL()
4205 if (N1C && N0.getOpcode() == ISD::SHL) { in visitSHL()
4208 uint64_t c2 = N1C->getZExtValue(); in visitSHL()
4221 if (N1C && (N0.getOpcode() == ISD::ZERO_EXTEND || in visitSHL()
4228 uint64_t c2 = N1C->getZExtValue(); in visitSHL()
4245 if (N1C && N0.getOpcode() == ISD::ZERO_EXTEND && N0.hasOneUse() && in visitSHL()
4251 uint64_t c2 = N1C->getZExtValue(); in visitSHL()
4268 if (N1C && N0.getOpcode() == ISD::SRL && N0.hasOneUse()) { in visitSHL()
4272 uint64_t c2 = N1C->getZExtValue(); in visitSHL()
4290 if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) { in visitSHL()
4294 BitSize - N1C->getZExtValue()), VT); in visitSHL()
4303 if (N1C && N0.getOpcode() == ISD::ADD && N0.getNode()->hasOneUse() && in visitSHL()
4311 if (N1C) { in visitSHL()
4312 SDValue NewSHL = visitShiftByConstant(N, N1C); in visitSHL()
4327 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRA() local
4332 N1C = isConstOrConstSplat(N1); in visitSRA()
4337 if (N0C && N1C) in visitSRA()
4338 return DAG.FoldConstantArithmetic(ISD::SRA, VT, N0C, N1C); in visitSRA()
4346 if (N1C && N1C->getZExtValue() >= OpSizeInBits) in visitSRA()
4349 if (N1C && N1C->isNullValue()) in visitSRA()
4353 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) { in visitSRA()
4354 unsigned LowBits = OpSizeInBits - (unsigned)N1C->getZExtValue(); in visitSRA()
4366 if (N1C && N0.getOpcode() == ISD::SRA) { in visitSRA()
4368 unsigned Sum = N1C->getZExtValue() + C1->getZExtValue(); in visitSRA()
4381 if (N0.getOpcode() == ISD::SHL && N1C) { in visitSRA()
4387 EVT TruncVT = EVT::getIntegerVT(Ctx, OpSizeInBits - N1C->getZExtValue()); in visitSRA()
4393 signed ShiftAmt = N1C->getZExtValue() - N01C->getZExtValue(); in visitSRA()
4431 N1C) { in visitSRA()
4439 DAG.getConstant(LargeShiftVal + N1C->getZExtValue(), in visitSRA()
4449 if (N1C && SimplifyDemandedBits(SDValue(N, 0))) in visitSRA()
4457 if (N1C) { in visitSRA()
4458 SDValue NewSRA = visitShiftByConstant(N, N1C); in visitSRA()
4473 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRL() local
4478 N1C = isConstOrConstSplat(N1); in visitSRL()
4483 if (N0C && N1C) in visitSRL()
4484 return DAG.FoldConstantArithmetic(ISD::SRL, VT, N0C, N1C); in visitSRL()
4489 if (N1C && N1C->getZExtValue() >= OpSizeInBits) in visitSRL()
4492 if (N1C && N1C->isNullValue()) in visitSRL()
4495 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0), in visitSRL()
4500 if (N1C && N0.getOpcode() == ISD::SRL) { in visitSRL()
4503 uint64_t c2 = N1C->getZExtValue(); in visitSRL()
4512 if (N1C && N0.getOpcode() == ISD::TRUNCATE && in visitSRL()
4517 uint64_t c2 = N1C->getZExtValue(); in visitSRL()
4533 if (N1C && N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1) { in visitSRL()
4536 uint64_t ShAmt = N1C->getZExtValue() + 64 - BitSize; in visitSRL()
4543 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) { in visitSRL()
4547 if (N1C->getZExtValue() >= BitSize) in visitSRL()
4551 uint64_t ShiftAmt = N1C->getZExtValue(); in visitSRL()
4565 if (N1C && N1C->getZExtValue() + 1 == OpSizeInBits) { in visitSRL()
4571 if (N1C && N0.getOpcode() == ISD::CTLZ && in visitSRL()
4572 N1C->getAPIntValue() == Log2_32(OpSizeInBits)) { in visitSRL()
4615 if (N1C && SimplifyDemandedBits(SDValue(N, 0))) in visitSRL()
4618 if (N1C) { in visitSRL()
4619 SDValue NewSRL = visitShiftByConstant(N, N1C); in visitSRL()
4766 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSELECT() local
4767 if (VT == MVT::i1 && N1C && N1C->getAPIntValue() == 1) in visitSELECT()
4785 N1C && N2C && N1C->isNullValue() && N2C->getAPIntValue() == 1) { in visitSELECT()
4798 if (VT == VT0 && VT == MVT::i1 && N1C && N1C->isNullValue()) { in visitSELECT()
4814 if (VT == MVT::i1 && (N0 == N1 || (N1C && N1C->getAPIntValue() == 1))) in visitSELECT()
12668 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in SimplifySelectCC() local
12759 if (N1C && N3C && N3C->isNullValue() && CC == ISD::SETLT && in SimplifySelectCC()
12760 (N1C->isNullValue() || // (a < 0) ? b : 0 in SimplifySelectCC()
12761 (N1C->getAPIntValue() == 1 && N0 == N2))) { // (a < 1) ? a : 0 in SimplifySelectCC()
12807 N1C && N1C->isNullValue() && in SimplifySelectCC()
12890 if (N1C && N1C->isNullValue() && CC == ISD::SETEQ && in SimplifySelectCC()
12899 if (N1C && N1C->isNullValue() && CC == ISD::SETGT) { in SimplifySelectCC()
12909 if (N1C && N1C->isAllOnesValue() && CC == ISD::SETGT) { in SimplifySelectCC()
12923 if (N1C) { in SimplifySelectCC()
12925 if (((N1C->isNullValue() && (CC == ISD::SETGT || CC == ISD::SETGE)) || in SimplifySelectCC()
12926 (N1C->isAllOnesValue() && CC == ISD::SETGT)) && in SimplifySelectCC()
12929 else if (((N1C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE)) || in SimplifySelectCC()
12930 (N1C->isOne() && CC == ISD::SETLT)) && in SimplifySelectCC()