Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DominatorConditionalEliminationPhase.java @ 21585:453284d62d64
Fix a bug in the dominator based conditional elimination.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 29 May 2015 10:52:21 +0200 |
parents | 48c1ebd24120 |
children | b14a218c5471 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DominatorConditionalEliminationPhase.java Fri May 29 09:08:21 2015 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DominatorConditionalEliminationPhase.java Fri May 29 10:52:21 2015 +0200 @@ -243,8 +243,12 @@ survivingSuccessor.replaceAtPredecessor(null); node.replaceAtPredecessor(survivingSuccessor); GraphUtil.killCFG(node); - if (survivingSuccessor.isAlive() && survivingSuccessor instanceof BeginNode) { - undoOperations.add(() -> ((BeginNode) survivingSuccessor).trySimplify()); + if (survivingSuccessor instanceof BeginNode) { + undoOperations.add(() -> { + if (survivingSuccessor.isAlive()) { + ((BeginNode) survivingSuccessor).trySimplify(); + } + }); } return true; });