Mercurial > hg > graal-compiler
changeset 23015:dc609421fcdb
ConditionAnchorNode: canonicalize should use the provided value rather than the current input
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Wed, 18 Nov 2015 17:45:18 +0100 |
parents | 60dd55e84d87 |
children | 27ee22a166d4 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConditionAnchorNode.java |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConditionAnchorNode.java Wed Nov 18 04:00:32 2015 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConditionAnchorNode.java Wed Nov 18 17:45:18 2015 +0100 @@ -70,12 +70,12 @@ } public Node canonical(CanonicalizerTool tool, Node forValue) { - if (condition instanceof LogicNegationNode) { - LogicNegationNode negation = (LogicNegationNode) condition; + if (forValue instanceof LogicNegationNode) { + LogicNegationNode negation = (LogicNegationNode) forValue; return new ConditionAnchorNode(negation.getValue(), !negated); } - if (condition instanceof LogicConstantNode) { - LogicConstantNode c = (LogicConstantNode) condition; + if (forValue instanceof LogicConstantNode) { + LogicConstantNode c = (LogicConstantNode) forValue; if (c.getValue() != negated) { return null; } else {