diff --git a/teavm-core/src/main/java/org/teavm/dependency/DataFlowGraphBuilder.java b/teavm-core/src/main/java/org/teavm/dependency/DataFlowGraphBuilder.java index d71cec93d..7fb34216b 100644 --- a/teavm-core/src/main/java/org/teavm/dependency/DataFlowGraphBuilder.java +++ b/teavm-core/src/main/java/org/teavm/dependency/DataFlowGraphBuilder.java @@ -66,11 +66,13 @@ public class DataFlowGraphBuilder implements InstructionReader { startNodes.add(i); } for (int pred : graph.incomingEdges(i)) { - if (importantNodes.contains(classes.find(pred)) && importantNodes.contains(classes.find(i))) { + boolean predImportant = importantNodes.contains(classes.find(pred)); + boolean nodeImportant = importantNodes.contains(classes.find(i)); + if (predImportant && nodeImportant) { continue; } int newCls = classes.union(pred, i); - if (importantNodes.contains(pred)) { + if (nodeImportant || predImportant) { importantNodes.add(newCls); } }