[Hexagon] Do not fall-through if there is no CFG edge
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 20 Oct 2015 19:30:21 +0000 (19:30 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 20 Oct 2015 19:30:21 +0000 (19:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250850 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/BitTracker.cpp

index 25ca44caf68e6a7d647ede75ef9496775dba4d47..23336b6546e2e46fd3fd7b307a8326ccfade0577 100644 (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));