# HG changeset patch # User Bernhard Urban # Date 1396619779 -7200 # Node ID 6270e260c23b6e2aa325c0cc25c76bf7912c738f # Parent 20b3db86b1fa824be5d1be21fef24e76f6af46f1 amd64peephole: use hasOperand() diff -r 20b3db86b1fa -r 6270e260c23b graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java Fri Apr 04 12:49:26 2014 +0200 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java Fri Apr 04 15:56:19 2014 +0200 @@ -72,7 +72,7 @@ FixedWithNextNode fixedWithNextNode = (FixedWithNextNode) node; if (((fixedWithNextNode instanceof IntegerDivNode) || (fixedWithNextNode instanceof IntegerRemNode)) && fixedWithNextNode.getClass() != divRem.getClass()) { FixedBinaryNode otherDivRem = (FixedBinaryNode) fixedWithNextNode; - if (otherDivRem.x() == divRem.x() && otherDivRem.y() == divRem.y() && operand(otherDivRem) == null) { + if (otherDivRem.x() == divRem.x() && otherDivRem.y() == divRem.y() && !hasOperand(otherDivRem)) { Value[] results = ((AMD64LIRGenerator) gen).emitIntegerDivRem(operand(divRem.x()), operand(divRem.y()), (DeoptimizingNode) valueNode); if (divRem instanceof IntegerDivNode) { setResult(divRem, results[0]);