# HG changeset patch # User Roland Schatz # Date 1402991003 -7200 # Node ID 9a595d3f9a2f038d983c092182aa94813d4bca5f # Parent a0d1dfc113b8b189bbc65296159747f1a161d417 Handle narrow oops in redundant move elimination. diff -r a0d1dfc113b8 -r 9a595d3f9a2f graal/com.oracle.graal.lir/src/com/oracle/graal/lir/RedundantMoveElimination.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/RedundantMoveElimination.java Mon Jun 16 19:38:05 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/RedundantMoveElimination.java Tue Jun 17 09:43:23 2014 +0200 @@ -340,7 +340,7 @@ int sourceIdx = getStateIdx(moveOp.getInput()); int destIdx = getStateIdx(moveOp.getResult()); if (sourceIdx >= 0 && destIdx >= 0) { - assert isObjectValue(state[sourceIdx]) || (moveOp.getInput().getKind() != Kind.Object) : "move op moves object but input is not defined as object"; + assert isObjectValue(state[sourceIdx]) || moveOp.getInput().getLIRKind().isValue() : "move op moves object but input is not defined as object"; state[destIdx] = state[sourceIdx]; Debug.log("move value %d from %d to %d", state[sourceIdx], sourceIdx, destIdx); return initValueNum; @@ -378,7 +378,7 @@ /* * Assign a unique number to the output or temp location. */ - state[stateIdx] = encodeValueNum(opValueNum++, operand.getKind() == Kind.Object); + state[stateIdx] = encodeValueNum(opValueNum++, !operand.getLIRKind().isValue()); Debug.log("set def %d for register %s(%d): %d", opValueNum, operand, stateIdx, state[stateIdx]); } return operand; @@ -510,7 +510,7 @@ /* * Moves with mismatching kinds are not moves, but memory loads/stores! */ - return source.getKind() == dest.getKind() && source.getLIRKind() == dest.getLIRKind() && source.getKind() != Kind.Illegal; + return source.getLIRKind().equals(dest.getLIRKind()); } return false; }