# HG changeset patch # User Roland Schatz # Date 1373882535 -7200 # Node ID 3811d04d933eb7e84663c57e2a8fedd644a1fb06 # Parent 257e2455270eca88273aac3e01538f380e03ada9 Do not re-compress oops that are already compressed. diff -r 257e2455270e -r 3811d04d933e graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Mon Jul 15 10:59:14 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Mon Jul 15 12:02:15 2013 +0200 @@ -449,8 +449,13 @@ Variable input = load(inputVal); if (isCompressCandidate(access)) { if (runtime().config.useCompressedOops && kind == Kind.Object) { - Variable scratch = newVariable(Kind.Long); - append(new StoreCompressedPointer(kind, storeAddress, input, scratch, state, runtime().config.narrowOopBase, runtime().config.narrowOopShift, runtime().config.logMinObjAlignment)); + if (input.getKind() == Kind.Object) { + Variable scratch = newVariable(Kind.Long); + append(new StoreCompressedPointer(kind, storeAddress, input, scratch, state, runtime().config.narrowOopBase, runtime().config.narrowOopShift, runtime().config.logMinObjAlignment)); + } else { + // the input oop is already compressed + append(new StoreOp(input.getKind(), storeAddress, input, state)); + } } else if (runtime().config.useCompressedKlassPointers && kind == Kind.Long) { Variable scratch = newVariable(Kind.Long); append(new StoreCompressedPointer(kind, storeAddress, input, scratch, state, runtime().config.narrowKlassBase, runtime().config.narrowKlassShift, runtime().config.logKlassAlignment));