Mercurial > hg > graal-compiler
changeset 22883:39b9743b8274
Move constants to the right in commutative nodes
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Sat, 24 Oct 2015 12:18:09 -0700 |
parents | 9fed99d7f32d |
children | 2fe4e3511d97 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java Sat Oct 24 00:49:18 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java Sat Oct 24 12:18:09 2015 -0700 @@ -75,7 +75,7 @@ @SuppressWarnings("deprecation") public LogicNode maybeCommuteInputs() { assert this instanceof BinaryCommutative; - if (x.getId() > y.getId()) { + if (x.isConstant() && !y.isConstant() || x.getId() > y.getId()) { ValueNode tmp = x; x = y; y = tmp;