Fix recognition of loop tree in a CFG

(cherry picked from commit 8f58b924628b87d13cfb8352d032a4932dcba17f)
This commit is contained in:
Alexey Andreev 2017-05-29 23:23:47 +03:00
parent b1b98097ee
commit 288e3b97fe

View File

@ -175,7 +175,7 @@ public class LoopGraph implements Graph {
if (loop == testLoop) {
return bestLoop;
}
if (loop.walkIndex < testLoop.walkIndex) {
if (loop.parent.walkIndex < testLoop.walkIndex) {
testLoop.parent = loop.parent;
loop.parent = testLoop;
break;