diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index 72008c9c95f..b6bc44e849e 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -97,7 +97,7 @@ void ScheduleDAGInstrs::BuildSchedUnits() { } if (Terminator && SU->Succs.empty()) Terminator->addPred(SU, /*isCtrl=*/false, /*isSpecial=*/false); - if (MI->getDesc().isTerminator()) + if (MI->getDesc().isTerminator() || MI->isLabel()) Terminator = SU; } }