summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2009-09-30 20:43:07 +0000
committerReid Kleckner <reid@kleckner.net>2009-09-30 20:43:07 +0000
commitcea8dab1d1103ec8408ed9d73e0956e9cb53c1aa (patch)
tree531192d64cd9518cfa86241560f0207fc11b8acd /llvm/lib/CodeGen
parentc87197784a20086e87a998c74f58fee591d29c74 (diff)
downloadbcm5719-llvm-cea8dab1d1103ec8408ed9d73e0956e9cb53c1aa.tar.gz
bcm5719-llvm-cea8dab1d1103ec8408ed9d73e0956e9cb53c1aa.zip
Silence comparison always false warning in -Asserts mode.
llvm-svn: 83164
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index bd6e04805f1..cd91b840d03 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -197,17 +197,17 @@ void ScheduleDAGRRList::Schedule() {
/// the AvailableQueue if the count reaches zero. Also update its cycle bound.
void ScheduleDAGRRList::ReleasePred(SUnit *SU, const SDep *PredEdge) {
SUnit *PredSU = PredEdge->getSUnit();
- --PredSU->NumSuccsLeft;
-
+
#ifndef NDEBUG
- if (PredSU->NumSuccsLeft < 0) {
+ if (PredSU->NumSuccsLeft == 0) {
errs() << "*** Scheduling failed! ***\n";
PredSU->dump(this);
errs() << " has been released too many times!\n";
llvm_unreachable(0);
}
#endif
-
+ --PredSU->NumSuccsLeft;
+
// If all the node's successors are scheduled, this node is ready
// to be scheduled. Ignore the special EntrySU node.
if (PredSU->NumSuccsLeft == 0 && PredSU != &EntrySU) {
OpenPOWER on IntegriCloud