Lines Matching refs:ConstantSDNode

335     SDValue visitShiftByConstant(SDNode *N, ConstantSDNode *Amt);
440 bool isAndLoadExtLoad(ConstantSDNode *AndC, LoadSDNode *LoadN,
780 static ConstantSDNode *isConstOrConstSplat(SDValue N) { in isConstOrConstSplat()
781 if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N)) in isConstOrConstSplat()
786 ConstantSDNode *CN = BV->getConstantSplatNode(&UndefElements); in isConstOrConstSplat()
1504 if (isa<ConstantSDNode>(N0) || !isa<ConstantSDNode>(N1)) { in combine()
1628 static ConstantSDNode *getAsNonOpaqueConstant(SDValue N) { in getAsNonOpaqueConstant()
1629 ConstantSDNode *Const = dyn_cast<ConstantSDNode>(N); in getAsNonOpaqueConstant()
1667 if (ConstantSDNode *N1C = getAsNonOpaqueConstant(N1)) { in visitADD()
1669 if (ConstantSDNode *N0C = getAsNonOpaqueConstant(N0.getOperand(0))) { in visitADD()
1716 if (isa<ConstantSDNode>(N00) || isa<ConstantSDNode>(N10)) in visitADD()
1792 ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0); in visitADDC()
1793 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDC()
1827 ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0); in visitADDE()
1828 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDE()
1877 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitSUB()
1878 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitSUB()
1898 ConstantSDNode *N1C1 = N1.getOpcode() != ISD::ADD ? nullptr : in visitSUB()
1899 dyn_cast<ConstantSDNode>(N1.getOperand(1).getNode()); in visitSUB()
2024 N0IsConst = isa<ConstantSDNode>(N0); in visitMUL()
2026 ConstValue0 = cast<ConstantSDNode>(N0)->getAPIntValue(); in visitMUL()
2027 N0IsOpaqueConst = cast<ConstantSDNode>(N0)->isOpaque(); in visitMUL()
2029 N1IsConst = isa<ConstantSDNode>(N1); in visitMUL()
2031 ConstValue1 = cast<ConstantSDNode>(N1)->getAPIntValue(); in visitMUL()
2032 N1IsOpaqueConst = cast<ConstantSDNode>(N1)->isOpaque(); in visitMUL()
2087 isa<ConstantSDNode>(N0.getOperand(1)))) { in visitMUL()
2100 isa<ConstantSDNode>(N0.getOperand(1))) && in visitMUL()
2104 isa<ConstantSDNode>(N1.getOperand(1)) && in visitMUL()
2235 ConstantSDNode *N0C = isConstOrConstSplat(N0); in visitSDIV()
2236 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitSDIV()
2334 ConstantSDNode *N0C = isConstOrConstSplat(N0); in visitUDIV()
2335 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitUDIV()
2348 if (ConstantSDNode *SHC = getAsNonOpaqueConstant(N1.getOperand(0))) { in visitUDIV()
2395 ConstantSDNode *N0C = isConstOrConstSplat(N0); in visitREM()
2396 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitREM()
2417 ConstantSDNode *SHC = getAsNonOpaqueConstant(N1.getOperand(0)); in visitREM()
2659 if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1))) in visitSMULO()
2669 if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1))) in visitUMULO()
2688 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitIMINMAX()
2689 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitIMINMAX()
2871 if (LR == RR && isa<ConstantSDNode>(LR) && Op0 == Op1 && in visitANDLike()
2898 if (LL == RL && isa<ConstantSDNode>(LR) && isa<ConstantSDNode>(RR) && in visitANDLike()
2934 if (ConstantSDNode *ADDI = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
2941 if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) { in visitANDLike()
2965 if (ConstantSDNode *CAnd = dyn_cast<ConstantSDNode>(N1)) { in visitANDLike()
2966 if (ConstantSDNode *CShift = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
3008 bool DAGCombiner::isAndLoadExtLoad(ConstantSDNode *AndC, LoadSDNode *LoadN, in isAndLoadExtLoad()
3080 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitAND()
3081 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitAND()
3101 if (ConstantSDNode *ORI = dyn_cast<ConstantSDNode>(N0.getOperand(1))) in visitAND()
3141 if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(N1)) { in visitAND()
3375 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
3385 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
3400 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
3401 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
3412 ConstantSDNode *N001C = dyn_cast<ConstantSDNode>(N00.getOperand(1)); in MatchBSwapHWordLow()
3423 ConstantSDNode *N101C = dyn_cast<ConstantSDNode>(N10.getOperand(1)); in MatchBSwapHWordLow()
3475 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
3497 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
3505 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
3514 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
3522 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
3673 if (const ConstantSDNode *N0O1C = in visitORLike()
3675 if (const ConstantSDNode *N1O1C = in visitORLike()
3807 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitOR()
3808 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitOR()
3840 isa<ConstantSDNode>(N0.getOperand(1))) { in visitOR()
3841 ConstantSDNode *C1 = cast<ConstantSDNode>(N0.getOperand(1)); in visitOR()
3930 if (ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(1))) { in matchRotateSub()
3941 ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(0)); in matchRotateSub()
3949 if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1))) in matchRotateSub()
3976 if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1))) in matchRotateSub()
4153 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitXOR()
4154 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitXOR()
4217 if (isa<ConstantSDNode>(RHS) || isa<ConstantSDNode>(LHS)) { in visitXOR()
4235 if (const ConstantSDNode *N00C = getAsNonOpaqueConstant(N0.getOperand(0))) { in visitXOR()
4241 if (const ConstantSDNode *N01C = getAsNonOpaqueConstant(N0.getOperand(1))) { in visitXOR()
4292 SDValue DAGCombiner::visitShiftByConstant(SDNode *N, ConstantSDNode *Amt) { in visitShiftByConstant()
4319 ConstantSDNode *BinOpCst = getAsNonOpaqueConstant(LHS->getOperand(1)); in visitShiftByConstant()
4331 !isa<ConstantSDNode>(BinOpLHSVal->getOperand(1))) in visitShiftByConstant()
4353 assert(isa<ConstantSDNode>(NewRHS) && "Folding was not successful!"); in visitShiftByConstant()
4372 if (ConstantSDNode *N01C = isConstOrConstSplat(N01)) { in distributeTruncateThroughAnd()
4409 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSHL()
4437 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitSHL()
4468 if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSHL()
4489 if (ConstantSDNode *N0Op0C1 = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSHL()
4512 if (ConstantSDNode *N0Op0C1 = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSHL()
4534 if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSHL()
4551 if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSHL()
4591 (isa<ConstantSDNode>(N0.getOperand(1)) || in visitSHL()
4600 if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSHL()
4621 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRA()
4630 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitSRA()
4661 if (ConstantSDNode *C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSRA()
4678 const ConstantSDNode *N01C = isConstOrConstSplat(N0.getOperand(1)); in visitSRA()
4728 if (ConstantSDNode *LargeShift = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSRA()
4767 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRL()
4776 ConstantSDNode *N0C = getAsNonOpaqueConstant(N0); in visitSRL()
4795 if (ConstantSDNode *N01C = isConstOrConstSplat(N0.getOperand(1))) { in visitSRL()
4809 isa<ConstantSDNode>(N0.getOperand(0)->getOperand(1))) { in visitSRL()
4811 cast<ConstantSDNode>(N0.getOperand(0)->getOperand(1))->getZExtValue(); in visitSRL()
5080 if (const ConstantSDNode *N0C = dyn_cast<const ConstantSDNode>(N0)) { in visitSELECT()
5294 ConstantSDNode *BottomHalf = nullptr; in ConvertSelectToConcatVector()
5300 BottomHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
5306 ConstantSDNode *TopHalf = nullptr; in ConvertSelectToConcatVector()
5312 TopHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
5729 if (ConstantSDNode *SCCC = dyn_cast<ConstantSDNode>(SCC.getNode())) { in visitSELECT_CC()
5794 if (isa<ConstantSDNode>(N0)) in tryToFoldExtendOfConstant()
5823 APInt C = cast<ConstantSDNode>(Op)->getAPIntValue().zextOrTrunc(EVTBits); in tryToFoldExtendOfConstant()
5862 if (!isa<ConstantSDNode>(UseOp)) in ExtendUsesToFormExtLoad()
6153 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitSIGN_EXTEND()
6381 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitZERO_EXTEND()
6439 auto *AndC = cast<ConstantSDNode>(N0.getOperand(1)); in visitZERO_EXTEND()
6456 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitZERO_EXTEND()
6541 isa<ConstantSDNode>(N0.getOperand(1)) && in visitZERO_EXTEND()
6545 unsigned ShAmtVal = cast<ConstantSDNode>(ShAmt)->getZExtValue(); in visitZERO_EXTEND()
6623 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitANY_EXTEND()
6728 const ConstantSDNode *CV = cast<ConstantSDNode>(V.getNode()); in GetDemandedBits()
6748 if (ConstantSDNode *RHSC = getAsNonOpaqueConstant(V.getOperand(1))) { in GetDemandedBits()
6789 ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in ReduceLoadWidth()
6806 if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in ReduceLoadWidth()
6838 if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in ReduceLoadWidth()
6993 if (ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1))) in visitSIGN_EXTEND_INREG()
7128 if (isa<ConstantSDNode>(EltNo) && isTypeLegal(NVT)) { in visitTRUNCATE()
7129 int Elt = cast<ConstantSDNode>(EltNo)->getZExtValue(); in visitTRUNCATE()
7157 if (const ConstantSDNode *CAmt = isConstOrConstSplat(N0.getOperand(1))) { in visitTRUNCATE()
7378 ConstantSDNode *LogicOp1 = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in foldBitcastedFPLogic()
7408 if (isa<ConstantSDNode>(N0) || isa<ConstantFPSDNode>(N0)) { in visitBITCAST()
7413 (isa<ConstantSDNode>(N0) && VT.isFloatingPoint() && !VT.isVector() && in visitBITCAST()
7716 NewBits |= cast<ConstantSDNode>(Op)->getAPIntValue(). in ConstantFoldBITCASTofBUILD_VECTOR()
7743 APInt OpVal = cast<ConstantSDNode>(Op)-> in ConstantFoldBITCASTofBUILD_VECTOR()
9493 const APInt &AndConst = cast<ConstantSDNode>(AndOp1)->getAPIntValue(); in visitBRCOND()
9496 cast<ConstantSDNode>(Op1)->getAPIntValue()==AndConst.logBase2()) { in visitBRCOND()
9632 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
9640 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
9704 if (isa<ConstantSDNode>(BasePtr)) { in CombineToPreIndexedLoadStore()
9742 if (isa<ConstantSDNode>(Offset)) in CombineToPreIndexedLoadStore()
9762 if (!isa<ConstantSDNode>(Op1)) { in CombineToPreIndexedLoadStore()
9844 ConstantSDNode *CN = in CombineToPreIndexedLoadStore()
9845 cast<ConstantSDNode>(OtherUses[i]->getOperand(OffsetIdx)); in CombineToPreIndexedLoadStore()
9848 APInt Offset1 = cast<ConstantSDNode>(Offset)->getAPIntValue(); in CombineToPreIndexedLoadStore()
10013 !cast<ConstantSDNode>(Inc)->isOpaque()) && in SplitIndexingFromLoad()
10016 ConstantSDNode *ConstInc = cast<ConstantSDNode>(Inc); in SplitIndexingFromLoad()
10066 cast<ConstantSDNode>(LD->getOperand(2))->isOpaque(); in visitLOAD()
10650 isa<ConstantSDNode>(User->getOperand(1))) { in SliceUpLoad()
10651 Shift = cast<ConstantSDNode>(User->getOperand(1))->getZExtValue(); in SliceUpLoad()
10725 !isa<ConstantSDNode>(V->getOperand(1)) || in CheckForMaskedLoad()
10758 uint64_t NotMask = ~cast<ConstantSDNode>(V->getOperand(1))->getSExtValue(); in CheckForMaskedLoad()
10907 APInt Imm = cast<ConstantSDNode>(N1)->getAPIntValue(); in ReduceLoadOpStoreWidth()
11092 if (isa<ConstantSDNode>(Ptr->getOperand(1))) { in match()
11093 int64_t Offset = cast<ConstantSDNode>(Ptr->getOperand(1))->getSExtValue(); in match()
11124 if (!isa<ConstantSDNode>(Offset)) in match()
11133 int64_t Off = cast<ConstantSDNode>(Offset)->getSExtValue(); in match()
11301 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Val)) { in MergeStoresOfConstantsOrVecElts()
11516 bool IsConstantSrc = isa<ConstantSDNode>(StoredVal) || in MergeConsecutiveStores()
11611 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(StoredVal)) { in MergeConsecutiveStores()
12198 if (!isa<ConstantSDNode>(EltNo)) in visitINSERT_VECTOR_ELT()
12200 unsigned Elt = cast<ConstantSDNode>(EltNo)->getZExtValue(); in visitINSERT_VECTOR_ELT()
12210 && isa<ConstantSDNode>(InVec.getOperand(2))) { in visitINSERT_VECTOR_ELT()
12212 cast<ConstantSDNode>(InVec.getOperand(2))->getZExtValue(); in visitINSERT_VECTOR_ELT()
12275 if (auto *ConstEltNo = dyn_cast<ConstantSDNode>(EltNo)) { in ReplaceExtractVectorEltOfLoadWithNarrowedLoad()
12353 ConstantSDNode *ConstEltNo = dyn_cast<ConstantSDNode>(EltNo); in visitEXTRACT_VECTOR_ELT()
12480 int Elt = cast<ConstantSDNode>(EltNo)->getZExtValue(); in visitEXTRACT_VECTOR_ELT()
12766 !isa<ConstantSDNode>(Op.getOperand(1))) { in visitBUILD_VECTOR()
12810 unsigned ExtIndex = cast<ConstantSDNode>(ExtVal)->getZExtValue(); in visitBUILD_VECTOR()
13002 if (!isa<ConstantSDNode>(Op.getOperand(1))) in combineConcatVectorOfExtracts()
13004 int ExtIdx = cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue(); in combineConcatVectorOfExtracts()
13177 ConstantSDNode *CS = dyn_cast<ConstantSDNode>(Op.getOperand(1)); in visitCONCAT_VECTORS()
13227 ConstantSDNode *ExtIdx = dyn_cast<ConstantSDNode>(N->getOperand(1)); in visitEXTRACT_SUBVECTOR()
13228 ConstantSDNode *InsIdx = dyn_cast<ConstantSDNode>(V->getOperand(2)); in visitEXTRACT_SUBVECTOR()
13289 auto *IdxN = dyn_cast<ConstantSDNode>(V->getOperand(2)); in simplifyShuffleOperandRecursively()
13766 ConstantSDNode *C0 = dyn_cast<ConstantSDNode>(EltNo); in visitSCALAR_TO_VECTOR()
13794 APInt InsIdx = cast<ConstantSDNode>(N2)->getAPIntValue(); in visitINSERT_SUBVECTOR()
13828 ConstantSDNode *AndConst = getAsNonOpaqueConstant(N0.getOperand(1)); in visitFP16_TO_FP()
13883 if (isa<ConstantSDNode>(Elt)) in XformToShuffleWithZero()
13884 Bits = cast<ConstantSDNode>(Elt)->getAPIntValue(); in XformToShuffleWithZero()
14167 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in SimplifySelectCC()
14168 ConstantSDNode *N2C = dyn_cast<ConstantSDNode>(N2.getNode()); in SimplifySelectCC()
14175 if (ConstantSDNode *SCCC = dyn_cast_or_null<ConstantSDNode>(SCC.getNode())) { in SimplifySelectCC()
14306 ConstantSDNode *ConstAndRHS = dyn_cast<ConstantSDNode>(N0->getOperand(1)); in SimplifySelectCC()
14378 ConstantSDNode *SubC = nullptr; in SimplifySelectCC()
14382 SubC = dyn_cast<ConstantSDNode>(N3.getOperand(0)); in SimplifySelectCC()
14386 SubC = dyn_cast<ConstantSDNode>(N2.getOperand(0)); in SimplifySelectCC()
14418 if (auto *ValueOnZeroC = dyn_cast<ConstantSDNode>(ValueOnZero)) { in SimplifySelectCC()
14460 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSDIV()
14480 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSDIVPow2()
14506 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildUDIV()
14718 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Base.getOperand(1))) { in FindBaseOffset()