[9] RFR (XS): 8148518: Unsafe.getCharUnaligned() loads aren't folded in case of -XX:-UseUnalignedAccesses

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Feb 15 20:06:31 UTC 2016

On 02/15/2016 10:01 PM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8148518/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8148518


> Current Unsafe::getCharUnaligned Java implementation isn't fully
> optimized by C2: it never constant folds such loads from char fields.
> C2 matches the types of a load and a location and does constant folding
> only if they match. For getCharUnaligned it sees a load of a short
> value, but the field is of type char.

Does the same affect putCharUnaligned?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160215/23db8cb1/signature.asc>

More information about the hotspot-compiler-dev mailing list