[ScheduleDAG] Fix false assert target

In SUnit::removePred, N->WeakSuccsLeft is reduced but WeakSuccsLeft is checked.

Reviewed By: kerbowa

Differential Revision: https://reviews.llvm.org/D151311
This commit is contained in:
lennyxiao 2023-09-27 11:43:29 +08:00 committed by laichunfeng
parent bd3f7376f1
commit 13c603a41f

View File

@ -201,7 +201,7 @@ void SUnit::removePred(const SDep &D) {
}
if (!isScheduled) {
if (D.isWeak()) {
assert(WeakSuccsLeft > 0 && "WeakSuccsLeft will underflow!");
assert(N->WeakSuccsLeft > 0 && "WeakSuccsLeft will underflow!");
--N->WeakSuccsLeft;
} else {
assert(N->NumSuccsLeft > 0 && "NumSuccsLeft will underflow!");