Skip to content

Commit 5877ba0

Browse files
committed
Address comments
1 parent 0507796 commit 5877ba0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15879,8 +15879,9 @@ static bool isValidBaseUpdate(SDNode *N, SDNode *User) {
1587915879
SmallVector<const SDNode *, 16> Worklist;
1588015880
Worklist.push_back(N);
1588115881
Worklist.push_back(User);
15882-
if (SDNode::hasPredecessorHelper(N, Visited, Worklist, 1024) ||
15883-
SDNode::hasPredecessorHelper(User, Visited, Worklist, 1024))
15882+
const unsigned MaxSteps = 1024;
15883+
if (SDNode::hasPredecessorHelper(N, Visited, Worklist, MaxSteps) ||
15884+
SDNode::hasPredecessorHelper(User, Visited, Worklist, MaxSteps))
1588415885
return false;
1588515886
return true;
1588615887
}
@@ -16270,7 +16271,7 @@ static SDValue CombineBaseUpdate(SDNode *N,
1627016271

1627116272
if (ConstInc || User->getOpcode() == ISD::ADD) {
1627216273
BaseUpdates.push_back({User, Inc, ConstInc});
16273-
if (BaseUpdates.size() > MaxBaseUpdates)
16274+
if (BaseUpdates.size() >= MaxBaseUpdates)
1627416275
break;
1627516276
}
1627616277
}
@@ -16299,7 +16300,7 @@ static SDValue CombineBaseUpdate(SDNode *N,
1629916300
unsigned NewConstInc = UserOffset - Offset;
1630016301
SDValue NewInc = DCI.DAG.getConstant(NewConstInc, SDLoc(N), MVT::i32);
1630116302
BaseUpdates.push_back({User, NewInc, NewConstInc});
16302-
if (BaseUpdates.size() > MaxBaseUpdates)
16303+
if (BaseUpdates.size() >= MaxBaseUpdates)
1630316304
break;
1630416305
}
1630516306
}
@@ -16367,8 +16368,9 @@ static SDValue PerformMVEVLDCombine(SDNode *N,
1636716368
Visited.insert(Addr.getNode());
1636816369
Worklist.push_back(N);
1636916370
Worklist.push_back(User);
16370-
if (SDNode::hasPredecessorHelper(N, Visited, Worklist, 1024) ||
16371-
SDNode::hasPredecessorHelper(User, Visited, Worklist, 1024))
16371+
const unsigned MaxSteps = 1024;
16372+
if (SDNode::hasPredecessorHelper(N, Visited, Worklist, MaxSteps) ||
16373+
SDNode::hasPredecessorHelper(User, Visited, Worklist, MaxSteps))
1637216374
continue;
1637316375

1637416376
// Find the new opcode for the updating load/store.

0 commit comments

Comments
 (0)