Lines Matching refs:N1C

1485   ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1506 if (N0C && N1C)
1507 return DAG.FoldConstantArithmetic(ISD::ADD, VT, N0C, N1C);
1509 if (N0C && !N1C)
1512 if (N1C && N1C->isNullValue())
1516 if (!LegalOperations && TLI.isOffsetFoldingLegal(GA) && N1C &&
1518 return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT,
1520 (uint64_t)N1C->getSExtValue());
1522 if (N1C && N0.getOpcode() == ISD::SUB)
1525 DAG.getConstant(N1C->getAPIntValue()+
1657 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1667 if (N0C && !N1C)
1671 if (N1C && N1C->isNullValue())
1699 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1702 if (N0C && !N1C)
1729 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
1749 if (N0C && N1C)
1750 return DAG.FoldConstantArithmetic(ISD::SUB, VT, N0C, N1C);
1752 if (N1C)
1754 DAG.getConstant(-N1C->getAPIntValue(), VT));
1804 if (N1C && GA->getOpcode() == ISD::GlobalAddress)
1805 return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT,
1807 (uint64_t)N1C->getSExtValue());
1822 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1838 if (N1C && N1C->isNullValue())
1987 ConstantSDNode *N1C = isConstOrConstSplat(N1);
1997 if (N0C && N1C && !N1C->isNullValue())
1998 return DAG.FoldConstantArithmetic(ISD::SDIV, VT, N0C, N1C);
2000 if (N1C && N1C->getAPIntValue() == 1LL)
2003 if (N1C && N1C->isAllOnesValue())
2015 if (N1C && !N1C->isNullValue() && (N1C->getAPIntValue().isPowerOf2() ||
2016 (-N1C->getAPIntValue()).isPowerOf2())) {
2022 unsigned lg2 = N1C->getAPIntValue().countTrailingZeros();
2044 if (N1C->getAPIntValue().isNonNegative())
2053 if (N1C && !TLI.isIntDivCheap()) {
2072 ConstantSDNode *N1C = isConstOrConstSplat(N1);
2082 if (N0C && N1C && !N1C->isNullValue())
2083 return DAG.FoldConstantArithmetic(ISD::UDIV, VT, N0C, N1C);
2085 if (N1C && N1C->getAPIntValue().isPowerOf2())
2087 DAG.getConstant(N1C->getAPIntValue().logBase2(),
2105 if (N1C && !TLI.isIntDivCheap()) {
2124 ConstantSDNode *N1C = isConstOrConstSplat(N1);
2128 if (N0C && N1C && !N1C->isNullValue())
2129 return DAG.FoldConstantArithmetic(ISD::SREM, VT, N0C, N1C);
2139 if (N1C && !N1C->isNullValue()) {
2166 ConstantSDNode *N1C = isConstOrConstSplat(N1);
2170 if (N0C && N1C && !N1C->isNullValue())
2171 return DAG.FoldConstantArithmetic(ISD::UREM, VT, N0C, N1C);
2173 if (N1C && !N1C->isNullValue() && N1C->getAPIntValue().isPowerOf2())
2175 DAG.getConstant(N1C->getAPIntValue()-1,VT));
2192 if (N1C && !N1C->isNullValue()) {
2218 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
2223 if (N1C && N1C->isNullValue())
2226 if (N1C && N1C->getAPIntValue() == 1)
2256 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
2261 if (N1C && N1C->isNullValue())
2264 if (N1C && N1C->getAPIntValue() == 1)
2595 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
2621 if (N0C && N1C)
2622 return DAG.FoldConstantArithmetic(ISD::AND, VT, N0C, N1C);
2624 if (N0C && !N1C)
2627 if (N1C && N1C->isAllOnesValue())
2630 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
2638 if (N1C && N0.getOpcode() == ISD::OR)
2640 if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue())
2643 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
2645 APInt Mask = ~N1C->getAPIntValue();
2875 if (N1C && (N0.getOpcode() == ISD::LOAD ||
2884 uint32_t ActiveBits = N1C->getAPIntValue().getActiveBits();
2885 if (ActiveBits > 0 && APIntOps::isMask(ActiveBits, N1C->getAPIntValue())){
2969 if (N1C && N1C->getAPIntValue() == 0xffff && N0.getOpcode() == ISD::OR) {
3096 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N.getOperand(1));
3097 if (!N1C)
3101 switch (N1C->getZExtValue()) {
3233 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3315 if (N0C && N1C)
3316 return DAG.FoldConstantArithmetic(ISD::OR, VT, N0C, N1C);
3318 if (N0C && !N1C)
3321 if (N1C && N1C->isNullValue())
3324 if (N1C && N1C->isAllOnesValue())
3327 if (N1C && DAG.MaskedValueIsZero(N0, ~N1C->getAPIntValue()))
3344 if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
3347 if ((C1->getAPIntValue() & N1C->getAPIntValue()) != 0) {
3348 SDValue COR = DAG.FoldConstantArithmetic(ISD::OR, VT, N1C, C1);
3700 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3724 if (N0C && N1C)
3725 return DAG.FoldConstantArithmetic(ISD::XOR, VT, N0C, N1C);
3727 if (N0C && !N1C)
3730 if (N1C && N1C->isNullValue())
3738 if (N1C && N1C->getAPIntValue() == 1 && isSetCCEquivalent(N0, LHS, RHS, CC)) {
3758 if (N1C && N1C->getAPIntValue() == 1 && N0.getOpcode() == ISD::ZERO_EXTEND &&
3769 if (N1C && N1C->getAPIntValue() == 1 && VT == MVT::i1 &&
3781 if (N1C && N1C->isAllOnesValue() &&
3801 if (N1C && N0.getOpcode() == ISD::XOR) {
3806 DAG.getConstant(N1C->getAPIntValue() ^
3810 DAG.getConstant(N1C->getAPIntValue() ^
3948 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3974 N1C = isConstOrConstSplat(N1);
3980 if (N0C && N1C)
3981 return DAG.FoldConstantArithmetic(ISD::SHL, VT, N0C, N1C);
3986 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
3989 if (N1C && N1C->isNullValue())
4006 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
4010 if (N1C && N0.getOpcode() == ISD::SHL) {
4013 uint64_t c2 = N1C->getZExtValue();
4026 if (N1C && (N0.getOpcode() == ISD::ZERO_EXTEND ||
4033 uint64_t c2 = N1C->getZExtValue();
4050 if (N1C && N0.getOpcode() == ISD::ZERO_EXTEND && N0.hasOneUse() &&
4056 uint64_t c2 = N1C->getZExtValue();
4073 if (N1C && N0.getOpcode() == ISD::SRL && N0.hasOneUse()) {
4077 uint64_t c2 = N1C->getZExtValue();
4095 if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) {
4099 BitSize - N1C->getZExtValue()), VT);
4104 if (N1C) {
4105 SDValue NewSHL = visitShiftByConstant(N, N1C);
4117 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
4126 N1C = isConstOrConstSplat(N1);
4130 if (N0C && N1C)
4131 return DAG.FoldConstantArithmetic(ISD::SRA, VT, N0C, N1C);
4139 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
4142 if (N1C && N1C->isNullValue())
4146 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) {
4147 unsigned LowBits = OpSizeInBits - (unsigned)N1C->getZExtValue();
4159 if (N1C && N0.getOpcode() == ISD::SRA) {
4161 unsigned Sum = N1C->getZExtValue() + C1->getZExtValue();
4174 if (N0.getOpcode() == ISD::SHL && N1C) {
4180 EVT TruncVT = EVT::getIntegerVT(Ctx, OpSizeInBits - N1C->getZExtValue());
4186 signed ShiftAmt = N1C->getZExtValue() - N01C->getZExtValue();
4224 N1C) {
4232 DAG.getConstant(LargeShiftVal + N1C->getZExtValue(),
4242 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
4250 if (N1C) {
4251 SDValue NewSRA = visitShiftByConstant(N, N1C);
4263 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
4272 N1C = isConstOrConstSplat(N1);
4276 if (N0C && N1C)
4277 return DAG.FoldConstantArithmetic(ISD::SRL, VT, N0C, N1C);
4282 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
4285 if (N1C && N1C->isNullValue())
4288 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
4293 if (N1C && N0.getOpcode() == ISD::SRL) {
4296 uint64_t c2 = N1C->getZExtValue();
4305 if (N1C && N0.getOpcode() == ISD::TRUNCATE &&
4310 uint64_t c2 = N1C->getZExtValue();
4326 if (N1C && N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1) {
4329 uint64_t ShAmt = N1C->getZExtValue() + 64 - BitSize;
4336 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
4340 if (N1C->getZExtValue() >= BitSize)
4344 uint64_t ShiftAmt = N1C->getZExtValue();
4358 if (N1C && N1C->getZExtValue() + 1 == OpSizeInBits) {
4364 if (N1C && N0.getOpcode() == ISD::CTLZ &&
4365 N1C->getAPIntValue() == Log2_32(OpSizeInBits)) {
4408 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
4411 if (N1C) {
4412 SDValue NewSRL = visitShiftByConstant(N, N1C);
4509 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
4524 if (VT == MVT::i1 && N1C && N1C->getAPIntValue() == 1)
4541 N1C && N2C && N1C->isNullValue() && N2C->getAPIntValue() == 1) {
4554 if (VT == VT0 && VT == MVT::i1 && N1C && N1C->isNullValue()) {
4570 if (VT == MVT::i1 && (N0 == N1 || (N1C && N1C->getAPIntValue() == 1)))
11114 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
11205 if (N1C && N3C && N3C->isNullValue() && CC == ISD::SETLT &&
11206 (N1C->isNullValue() || // (a < 0) ? b : 0
11207 (N1C->getAPIntValue() == 1 && N0 == N2))) { // (a < 1) ? a : 0
11253 N1C && N1C->isNullValue() &&
11336 if (N1C && N1C->isNullValue() && CC == ISD::SETEQ &&
11345 if (N1C && N1C->isNullValue() && CC == ISD::SETGT) {
11355 if (N1C && N1C->isAllOnesValue() && CC == ISD::SETGT) {
11369 if (N1C) {
11371 if (((N1C->isNullValue() && (CC == ISD::SETGT || CC == ISD::SETGE)) ||
11372 (N1C->isAllOnesValue() && CC == ISD::SETGT)) &&
11375 else if (((N1C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE)) ||
11376 (N1C->isOne() && CC == ISD::SETLT)) &&