Mercurial > hg > graal-jvmci-8
changeset 10747:3811d04d933e
Do not re-compress oops that are already compressed.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 15 Jul 2013 12:02:15 +0200 |
parents | 257e2455270e |
children | a5c9bc1f28fb 64740220db85 |
files | graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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));