Home | History | Annotate | Download | only in SelectionDAG

Lines Matching refs:N1C

1662   ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
1663 if (N0C && N1C)
1664 return DAG.FoldConstantArithmetic(ISD::ADD, SDLoc(N), VT, N0C, N1C);
1674 if (!LegalOperations && TLI.isOffsetFoldingLegal(GA) && N1C &&
1676 return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT,
1678 (uint64_t)N1C->getSExtValue());
1680 if (N1C && N0.getOpcode() == ISD::SUB)
1684 DAG.getConstant(N1C->getAPIntValue()+
1804 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1805 if (N0C && !N1C)
1839 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1840 if (N0C && !N1C)
1884 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
1885 if (N0C && N1C)
1886 return DAG.FoldConstantArithmetic(ISD::SUB, SDLoc(N), VT, N0C, N1C);
1888 if (N1C) {
1891 DAG.getConstant(-N1C->getAPIntValue(), DL, VT));
1945 if (N1C && GA->getOpcode() == ISD::GlobalAddress)
1946 return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT,
1948 (uint64_t)N1C->getSExtValue());
2241 ConstantSDNode *N1C = isConstOrConstSplat(N1);
2242 if (N0C && N1C && !N0C->isOpaque() && !N1C->isOpaque())
2243 return DAG.FoldConstantArithmetic(ISD::SDIV, DL, VT, N0C, N1C);
2245 if (N1C && N1C->isOne())
2248 if (N1C && N1C->isAllOnesValue())
2263 if (N1C && !N1C->isNullValue() && !N1C->isOpaque() &&
2265 (N1C->getAPIntValue().isPowerOf2() ||
2266 (-N1C->getAPIntValue()).isPowerOf2())) {
2271 unsigned lg2 = N1C->getAPIntValue().countTrailingZeros();
2294 if (N1C->getAPIntValue().isNonNegative())
2305 if (N1C && !TLI.isIntDivCheap(N->getValueType(0), Attr))
2312 if (!N1C || TLI.isIntDivCheap(N->getValueType(0), Attr))
2340 ConstantSDNode *N1C = isConstOrConstSplat(N1);
2341 if (N0C && N1C)
2343 N0C, N1C))
2346 if (N1C && !N1C->isOpaque() && N1C->getAPIntValue().isPowerOf2())
2348 DAG.getConstant(N1C->getAPIntValue().logBase2(), DL,
2369 if (N1C && !TLI.isIntDivCheap(N->getValueType(0), Attr))
2376 if (!N1C || TLI.isIntDivCheap(N->getValueType(0), Attr))
2401 ConstantSDNode *N1C = isConstOrConstSplat(N1);
2402 if (N0C && N1C)
2403 if (SDValue Folded = DAG.FoldConstantArithmetic(Opcode, DL, VT, N0C, N1C))
2415 if (N1C && !N1C->isNullValue() && !N1C->isOpaque() &&
2416 N1C->getAPIntValue().isPowerOf2()) {
2418 DAG.getConstant(N1C->getAPIntValue() - 1, DL, VT));
2445 if (N1C && !N1C->isNullValue() && !TLI.isIntDivCheap(VT, Attr)) {
2696 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
2697 if (N0C && N1C)
2698 return DAG.FoldConstantArithmetic(N->getOpcode(), SDLoc(N), VT, N0C, N1C);
3044 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3045 if (N0C && N1C && !N1C->isOpaque())
3046 return DAG.FoldConstantArithmetic(ISD::AND, SDLoc(N), VT, N0C, N1C);
3056 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
3063 if (N1C && N0.getOpcode() == ISD::OR)
3065 if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue())
3068 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
3070 APInt Mask = ~N1C->getAPIntValue();
3195 if (N1C && (N0.getOpcode() == ISD::LOAD ||
3207 if (isAndLoadExtLoad(N1C, LN0, LoadResultTy, ExtVT, LoadedVT,
3306 if (N1C && N1C->getAPIntValue() == 0xffff && N0.getOpcode() == ISD::OR) {
3438 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N.getOperand(1));
3439 if (!N1C)
3443 switch (N1C->getZExtValue()) {
3760 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3761 if (N0C && N1C && !N1C->isOpaque())
3762 return DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N), VT, N0C, N1C);
3774 if (N1C && DAG.MaskedValueIsZero(N0, ~N1C->getAPIntValue()))
3791 if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
3794 if ((C1->getAPIntValue() & N1C->getAPIntValue()) != 0) {
3796 N1C, C1))
4106 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
4107 if (N0C && N1C)
4108 return DAG.FoldConstantArithmetic(ISD::XOR, SDLoc(N), VT, N0C, N1C);
4186 if (N1C && N0.getOpcode() == ISD::XOR) {
4190 DAG.getConstant(N1C->getAPIntValue() ^
4196 DAG.getConstant(N1C->getAPIntValue() ^
4361 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
4383 N1C = isConstOrConstSplat(N1);
4390 if (N0C && N1C && !N1C->isOpaque())
4391 return DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT, N0C, N1C);
4396 if (N1C && N1C->getAPIntValue().uge(OpSizeInBits))
4399 if (N1C && N1C->isNullValue())
4416 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
4420 if (N1C && N0.getOpcode() == ISD::SHL) {
4423 uint64_t c2 = N1C->getZExtValue();
4437 if (N1C && (N0.getOpcode() == ISD::ZERO_EXTEND ||
4444 uint64_t c2 = N1C->getZExtValue();
4462 if (N1C && N0.getOpcode() == ISD::ZERO_EXTEND && N0.hasOneUse() &&
4468 uint64_t c2 = N1C->getZExtValue();
4485 if (N1C && (N0.getOpcode() == ISD::SRL || N0.getOpcode() == ISD::SRA) &&
4489 uint64_t C2 = N1C->getZExtValue();
4503 if (N1C && N0.getOpcode() == ISD::SRL && N0.hasOneUse()) {
4507 uint64_t c2 = N1C->getZExtValue();
4528 if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) {
4533 BitSize - N1C->getZExtValue()),
4543 if (N1C && N0.getOpcode() == ISD::ADD && N0.getNode()->hasOneUse() &&
4552 if (N1C && N0.getOpcode() == ISD::MUL && N0.getNode()->hasOneUse()) {
4555 DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N1), VT, N0C1, N1C))
4560 if (N1C && !N1C->isOpaque())
4561 if (SDValue NewSHL = visitShiftByConstant(N, N1C))
4574 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
4579 N1C = isConstOrConstSplat(N1);
4584 if (N0C && N1C && !N1C->isOpaque())
4585 return DAG.FoldConstantArithmetic(ISD::SRA, SDLoc(N), VT, N0C, N1C);
4593 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
4596 if (N1C && N1C->isNullValue())
4600 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) {
4601 unsigned LowBits = OpSizeInBits - (unsigned)N1C->getZExtValue();
4613 if (N1C && N0.getOpcode() == ISD::SRA) {
4615 unsigned Sum = N1C->getZExtValue() + C1->getZExtValue();
4629 if (N0.getOpcode() == ISD::SHL && N1C) {
4635 EVT TruncVT = EVT::getIntegerVT(Ctx, OpSizeInBits - N1C->getZExtValue());
4641 signed ShiftAmt = N1C->getZExtValue() - N01C->getZExtValue();
4680 N1C) {
4689 DAG.getConstant(LargeShiftVal + N1C->getZExtValue(), DL,
4699 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
4707 if (N1C && !N1C->isOpaque())
4708 if (SDValue NewSRA = visitShiftByConstant(N, N1C))
4721 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
4726 N1C = isConstOrConstSplat(N1);
4731 if (N0C && N1C && !N1C->isOpaque())
4732 return DAG.FoldConstantArithmetic(ISD::SRL, SDLoc(N), VT, N0C, N1C);
4737 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
4740 if (N1C && N1C->isNullValue())
4743 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
4748 if (N1C && N0.getOpcode() == ISD::SRL) {
4751 uint64_t c2 = N1C->getZExtValue();
4761 if (N1C && N0.getOpcode() == ISD::TRUNCATE &&
4766 uint64_t c2 = N1C->getZExtValue();
4784 if (N1C && N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1) {
4787 uint64_t ShAmt = N1C->getZExtValue() + 64 - BitSize;
4795 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
4799 if (N1C->getZExtValue() >= BitSize)
4803 uint64_t ShiftAmt = N1C->getZExtValue();
4820 if (N1C && N1C->getZExtValue() + 1 == OpSizeInBits) {
4826 if (N1C && N0.getOpcode() == ISD::CTLZ &&
4827 N1C->getAPIntValue() == Log2_32(OpSizeInBits)) {
4872 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
4875 if (N1C && !N1C->isOpaque())
4876 if (SDValue NewSRL = visitShiftByConstant(N, N1C))
8201 if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N1))
8202 if (N1C->isZero())
13983 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
14193 if (N1C) {
14195 if (((N1C->isNullValue() && (CC == ISD::SETGT || CC == ISD::SETGE)) ||
14196 (N1C->isAllOnesValue() && CC == ISD::SETGT)) &&
14199 else if (((N1C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE)) ||
14200 (N1C->isOne() && CC == ISD::SETLT)) &&