changeset 10610:1db97e3de11c

Do not re-compress oops that are already compressed.
author Roland Schatz <roland.schatz@oracle.com>
date Fri, 05 Jul 2013 15:18:37 +0200
parents 5f016460f95b
children 1546866ebb8d
files graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java	Fri Jul 05 13:28:18 2013 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java	Fri Jul 05 15:18:37 2013 +0200
@@ -432,8 +432,12 @@
         }
         Variable input = load(inputVal);
         if (runtime().config.useCompressedOops && isCompressCandidate(access)) {
-            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 {
+                append(new StoreOp(input.getKind(), storeAddress, input, state));
+            }
         } else {
             append(new StoreOp(kind, storeAddress, input, state));
         }