Skip to content

Commit d0e4fe0

Browse files
authored
Merge pull request #2110 from compnerd/2100-20200714
[ScheduleDAGRRList] Pacify overload mismatch in std::min.
2 parents 8bb3607 + b0ee386 commit d0e4fe0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,8 @@ static SUnit *popFromQueueImpl(std::vector<SUnit *> &Q, SF &Picker) {
18411841
unsigned BestIdx = 0;
18421842
// Only compute the cost for the first 1000 items in the queue, to avoid
18431843
// excessive compile-times for very large queues.
1844-
for (unsigned I = 1, E = std::min(Q.size(), 1000ul); I != E; I++)
1844+
for (unsigned I = 1, E = std::min(Q.size(), (decltype(Q.size()))1000); I != E;
1845+
I++)
18451846
if (Picker(Q[BestIdx], Q[I]))
18461847
BestIdx = I;
18471848
SUnit *V = Q[BestIdx];

0 commit comments

Comments
 (0)