# HG changeset patch # User Lukas Stadler # Date 1348565376 -7200 # Node ID 4bd8711d824af512150009b2aa31442f78720ab5 # Parent 3638582c26ebfeaac815ddf38e62da2ae4d9b9e6 small fix to tail duplication heuristics diff -r 3638582c26eb -r 4bd8711d824a graal/com.oracle.graal.compiler.phases/src/com/oracle/graal/compiler/phases/TailDuplicationPhase.java --- a/graal/com.oracle.graal.compiler.phases/src/com/oracle/graal/compiler/phases/TailDuplicationPhase.java Tue Sep 25 09:10:40 2012 +0200 +++ b/graal/com.oracle.graal.compiler.phases/src/com/oracle/graal/compiler/phases/TailDuplicationPhase.java Tue Sep 25 11:29:36 2012 +0200 @@ -95,8 +95,13 @@ while (current instanceof FixedWithNextNode) { current = ((FixedWithNextNode) current).next(); for (PhiNode phi : improvements) { - if (current.inputs().contains(phi)) { - opportunities++; + for (Node input : current.inputs()) { + if (input == phi) { + opportunities++; + } + if (input.inputs().contains(phi)) { + opportunities++; + } } } }