Mercurial > hg > graal-compiler
changeset 11696:7f8c80e31750
Fix GuardingPiNode to preserve checkcast semantics also if value of checkcast is unused.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 18 Sep 2013 02:41:41 +0200 |
parents | e9cf2b37c713 |
children | 56e59e384dc1 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Wed Sep 18 00:38:19 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Wed Sep 18 02:41:41 2013 +0200 @@ -81,8 +81,10 @@ throw new GraalInternalError("Cannot create guards in after-guard lowering"); } GuardingNode guard = tool.createGuard(condition, reason, action, negated); + ValueAnchorNode anchor = graph().add(new ValueAnchorNode((ValueNode) guard)); PiNode pi = graph().unique(new PiNode(object, stamp(), guard)); - graph().replaceFixedWithFloating(this, pi); + replaceAtUsages(pi); + graph().replaceFixedWithFixed(this, anchor); } @Override