[Hexagon] Do not fall-through if there is no CFG edge

llvm-svn: 250850
This commit is contained in:
Krzysztof Parzyszek 2015-10-20 19:30:21 +00:00
parent bfe8e92fd1
commit e4cff4058c
1 changed files with 1 additions and 1 deletions

View File

@ -1106,7 +1106,7 @@ void BT::run() {
if (It == End) {
MachineFunction::const_iterator BIt = B.getIterator();
MachineFunction::const_iterator Next = std::next(BIt);
if (Next != MF.end()) {
if (Next != MF.end() && B.isSuccessor(Next)) {
int ThisN = B.getNumber();
int NextN = Next->getNumber();
FlowQ.push(CFGEdge(ThisN, NextN));