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

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 10:29:56 PDT 2016


Author: chapuni
Date: Mon May  2 12:29:55 2016
New Revision: 268257

URL: http://llvm.org/viewvc/llvm-project?rev=268257&view=rev
Log:
ScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will fix the crash in r268143.

Modified:
    llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp

Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=268257&r1=268256&r2=268257&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Mon May  2 12:29:55 2016
@@ -825,7 +825,7 @@ void ScheduleDAGInstrs::insertBarrierCha
     }
 
     // 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.




More information about the llvm-commits mailing list