ScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will fix the crash in r268143.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2016-05-02 17:29:55 +00:00
parent 1e477250a6
commit 1be8ec9b75

View File

@ -825,7 +825,7 @@ void ScheduleDAGInstrs::insertBarrierChain(Value2SUsMap &map) {
}
// Remove also the BarrierChain from list if present.
if (*SUItr == BarrierChain)
if (SUItr != SUEE && *SUItr == BarrierChain)
SUItr++;
// Remove all SUs that are now successors of BarrierChain.