ScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 2 May 2016 17:29:55 +0000 (17:29 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 2 May 2016 17:29:55 +0000 (17:29 +0000)
llvm-svn: 268257

llvm/lib/CodeGen/ScheduleDAGInstrs.cpp

index bcff1f6..34cebae 100644 (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.