# HG changeset patch # User Tom Rodriguez # Date 1389141150 28800 # Node ID da9d9823628f4c59263bd23c6d7cf6d78449eac9 # Parent 63bb635911abf0b8e1ee1c497c581ddeab8e54f3 Enable more constant stores diff -r 63bb635911ab -r da9d9823628f 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 Tue Jan 07 14:59:18 2014 -0800 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Tue Jan 07 16:32:30 2014 -0800 @@ -506,19 +506,24 @@ boolean isCompressed = isCompressedOperation(kind, access); if (isConstant(inputVal)) { Constant c = asConstant(inputVal); - if (isCompressed && canStoreConstant(c, isCompressed)) { - if (c.getKind() == Kind.Object) { - Constant value = c.isNull() ? c : compress(c, config.getOopEncoding()); - append(new StoreCompressedConstantOp(kind, storeAddress, value, state)); - } else if (c.getKind() == Kind.Long) { - // It's always a good idea to directly store compressed constants since they - // have to be materialized as 64 bits encoded otherwise. - Constant value = compress(c, config.getKlassEncoding()); - append(new StoreCompressedConstantOp(kind, storeAddress, value, state)); + if (canStoreConstant(c, isCompressed)) { + if (isCompressed) { + if (c.getKind() == Kind.Object) { + Constant value = c.isNull() ? c : compress(c, config.getOopEncoding()); + append(new StoreCompressedConstantOp(kind, storeAddress, value, state)); + } else if (c.getKind() == Kind.Long) { + // It's always a good idea to directly store compressed constants since they + // have to be materialized as 64 bits encoded otherwise. + Constant value = compress(c, config.getKlassEncoding()); + append(new StoreCompressedConstantOp(kind, storeAddress, value, state)); + } else { + throw GraalInternalError.shouldNotReachHere("can't handle: " + access); + } + return; } else { - throw GraalInternalError.shouldNotReachHere("can't handle: " + access); + append(new StoreConstantOp(kind, storeAddress, c, state)); + return; } - return; } } Variable input = load(inputVal);