@@ -202,7 +202,7 @@ namespace {
202202 /// When an instruction is simplified, add all users of the instruction to
203203 /// the work lists because they might get more simplified now.
204204 void AddUsersToWorklist(SDNode *N) {
205- for (SDNode *Node : N->uses ())
205+ for (SDNode *Node : N->users ())
206206 AddToWorklist(Node);
207207 }
208208
@@ -1113,7 +1113,7 @@ bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc,
11131113 : N1.getConstantOperandVal(1)));
11141114 if (Opc == ISD::SUB)
11151115 ScalableOffset = -ScalableOffset;
1116- if (all_of(N->uses (), [&](SDNode *Node) {
1116+ if (all_of(N->users (), [&](SDNode *Node) {
11171117 if (auto *LoadStore = dyn_cast<MemSDNode>(Node);
11181118 LoadStore && LoadStore->getBasePtr().getNode() == N) {
11191119 TargetLoweringBase::AddrMode AM;
@@ -1151,7 +1151,7 @@ bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc,
11511151 return false;
11521152 const int64_t CombinedValue = CombinedValueIntVal.getSExtValue();
11531153
1154- for (SDNode *Node : N->uses ()) {
1154+ for (SDNode *Node : N->users ()) {
11551155 if (auto *LoadStore = dyn_cast<MemSDNode>(Node)) {
11561156 // Is x[offset2] already not a legal addressing mode? If so then
11571157 // reassociating the constants breaks nothing (we test offset2 because
@@ -1176,7 +1176,7 @@ bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc,
11761176 if (GA->getOpcode() == ISD::GlobalAddress && TLI.isOffsetFoldingLegal(GA))
11771177 return false;
11781178
1179- for (SDNode *Node : N->uses ()) {
1179+ for (SDNode *Node : N->users ()) {
11801180 auto *LoadStore = dyn_cast<MemSDNode>(Node);
11811181 if (!LoadStore)
11821182 return false;
@@ -4720,7 +4720,7 @@ SDValue DAGCombiner::useDivRem(SDNode *Node) {
47204720 SDValue Op0 = Node->getOperand(0);
47214721 SDValue Op1 = Node->getOperand(1);
47224722 SDValue combined;
4723- for (SDNode *User : Op0->uses ()) {
4723+ for (SDNode *User : Op0->users ()) {
47244724 if (User == Node || User->getOpcode() == ISD::DELETED_NODE ||
47254725 User->use_empty())
47264726 continue;
@@ -10369,7 +10369,7 @@ static SDValue combineShiftToMULH(SDNode *N, const SDLoc &DL, SelectionDAG &DAG,
1036910369 unsigned MulLoHiOp = IsSignExt ? ISD::SMUL_LOHI : ISD::UMUL_LOHI;
1037010370 if (!ShiftOperand.hasOneUse() &&
1037110371 TLI.isOperationLegalOrCustom(MulLoHiOp, NarrowVT) &&
10372- llvm::any_of(ShiftOperand->uses (), UserOfLowerBits)) {
10372+ llvm::any_of(ShiftOperand->users (), UserOfLowerBits)) {
1037310373 return SDValue();
1037410374 }
1037510375
@@ -13570,7 +13570,7 @@ static SDValue tryToFoldExtOfLoad(SelectionDAG &DAG, DAGCombiner &Combiner,
1357013570 if (NonNegZExt) {
1357113571 assert(ExtLoadType == ISD::ZEXTLOAD && ExtOpc == ISD::ZERO_EXTEND &&
1357213572 "Unexpected load type or opcode");
13573- for (SDNode *User : N0->uses ()) {
13573+ for (SDNode *User : N0->users ()) {
1357413574 if (User->getOpcode() == ISD::SETCC) {
1357513575 ISD::CondCode CC = cast<CondCodeSDNode>(User->getOperand(2))->get();
1357613576 if (ISD::isSignedIntSetCC(CC)) {
@@ -17673,7 +17673,7 @@ SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) {
1767317673 // Find all FDIV users of the same divisor.
1767417674 // Use a set because duplicates may be present in the user list.
1767517675 SetVector<SDNode *> Users;
17676- for (auto *U : N1->uses ()) {
17676+ for (auto *U : N1->users ()) {
1767717677 if (U->getOpcode() == ISD::FDIV && U->getOperand(1) == N1) {
1767817678 // Skip X/sqrt(X) that has not been simplified to sqrt(X) yet.
1767917679 if (U->getOperand(1).getOpcode() == ISD::FSQRT &&
@@ -18965,7 +18965,7 @@ bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) {
1896518965 // Now check for #3 and #4.
1896618966 bool RealUse = false;
1896718967
18968- for (SDNode *Use : Ptr->uses ()) {
18968+ for (SDNode *Use : Ptr->users ()) {
1896918969 if (Use == N)
1897018970 continue;
1897118971 if (SDNode::hasPredecessorHelper(Use, Visited, Worklist, MaxSteps))
@@ -19089,7 +19089,7 @@ static bool shouldCombineToPostInc(SDNode *N, SDValue Ptr, SDNode *PtrUse,
1908919089
1909019090 SmallPtrSet<const SDNode *, 32> Visited;
1909119091 unsigned MaxSteps = SelectionDAG::getHasPredecessorMaxSteps();
19092- for (SDNode *Use : BasePtr->uses ()) {
19092+ for (SDNode *Use : BasePtr->users ()) {
1909319093 if (Use == Ptr.getNode())
1909419094 continue;
1909519095
@@ -19110,7 +19110,7 @@ static bool shouldCombineToPostInc(SDNode *N, SDValue Ptr, SDNode *PtrUse,
1911019110 // If all the uses are load / store addresses, then don't do the
1911119111 // transformation.
1911219112 if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB) {
19113- for (SDNode *UseUse : Use->uses ())
19113+ for (SDNode *UseUse : Use->users ())
1911419114 if (canFoldInAddressingMode(Use, UseUse, DAG, TLI))
1911519115 return false;
1911619116 }
@@ -19136,7 +19136,7 @@ static SDNode *getPostIndexedLoadStoreOp(SDNode *N, bool &IsLoad,
1913619136 // nor a successor of N. Otherwise, if Op is folded that would
1913719137 // create a cycle.
1913819138 unsigned MaxSteps = SelectionDAG::getHasPredecessorMaxSteps();
19139- for (SDNode *Op : Ptr->uses ()) {
19139+ for (SDNode *Op : Ptr->users ()) {
1914019140 // Check for #1.
1914119141 if (!shouldCombineToPostInc(N, Ptr, Op, BasePtr, Offset, AM, DAG, TLI))
1914219142 continue;
@@ -20515,7 +20515,7 @@ bool DAGCombiner::isMulAddWithConstProfitable(SDNode *MulNode, SDValue AddNode,
2051520515 return true;
2051620516
2051720517 // Walk all the users of the constant with which we're multiplying.
20518- for (SDNode *Use : ConstNode->uses ()) {
20518+ for (SDNode *Use : ConstNode->users ()) {
2051920519 if (Use == MulNode) // This use is the one we're on right now. Skip it.
2052020520 continue;
2052120521
@@ -22902,7 +22902,7 @@ bool DAGCombiner::refineExtractVectorEltIntoMultipleNarrowExtractVectorElts(
2290222902 // Did we fail to model any of the users of the Producer?
2290322903 bool ProducerIsLeaf = false;
2290422904 // Look at each user of this Producer.
22905- for (SDNode *User : E.Producer->uses ()) {
22905+ for (SDNode *User : E.Producer->users ()) {
2290622906 switch (User->getOpcode()) {
2290722907 // TODO: support ISD::BITCAST
2290822908 // TODO: support ISD::ANY_EXTEND
@@ -23176,13 +23176,13 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
2317623176
2317723177 // If only EXTRACT_VECTOR_ELT nodes use the source vector we can
2317823178 // simplify it based on the (valid) extraction indices.
23179- if (llvm::all_of(VecOp->uses (), [&](SDNode *Use) {
23179+ if (llvm::all_of(VecOp->users (), [&](SDNode *Use) {
2318023180 return Use->getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
2318123181 Use->getOperand(0) == VecOp &&
2318223182 isa<ConstantSDNode>(Use->getOperand(1));
2318323183 })) {
2318423184 APInt DemandedElts = APInt::getZero(NumElts);
23185- for (SDNode *Use : VecOp->uses ()) {
23185+ for (SDNode *Use : VecOp->users ()) {
2318623186 auto *CstElt = cast<ConstantSDNode>(Use->getOperand(1));
2318723187 if (CstElt->getAPIntValue().ult(NumElts))
2318823188 DemandedElts.setBit(CstElt->getZExtValue());
@@ -27302,7 +27302,7 @@ SDValue DAGCombiner::visitGET_FPENV_MEM(SDNode *N) {
2730227302 // Check if the memory, where FP state is written to, is used only in a single
2730327303 // load operation.
2730427304 LoadSDNode *LdNode = nullptr;
27305- for (auto *U : Ptr->uses ()) {
27305+ for (auto *U : Ptr->users ()) {
2730627306 if (U == N)
2730727307 continue;
2730827308 if (auto *Ld = dyn_cast<LoadSDNode>(U)) {
@@ -27352,7 +27352,7 @@ SDValue DAGCombiner::visitSET_FPENV_MEM(SDNode *N) {
2735227352
2735327353 // Check if the address of FP state is used also in a store operation only.
2735427354 StoreSDNode *StNode = nullptr;
27355- for (auto *U : Ptr->uses ()) {
27355+ for (auto *U : Ptr->users ()) {
2735627356 if (U == N)
2735727357 continue;
2735827358 if (auto *St = dyn_cast<StoreSDNode>(U)) {
0 commit comments