From: NAKAMURA Takumi Date: Mon, 2 May 2016 17:29:55 +0000 (+0000) Subject: ScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will... X-Git-Tag: llvmorg-3.9.0-rc1~7257 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc46f624cdeb7f863c0c5b189658e78f27fd0dd7;p=platform%2Fupstream%2Fllvm.git ScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will fix the crash in r268143. llvm-svn: 268257 --- diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp index bcff1f6..34cebae 100644 --- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -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.