[9] RFR (XXS): 8152857: [TESTBUG] UnsafeGetConstantField.testUnsafeGetFieldUnaligned fails w/ -XX:-UseUnalignedAccesses in -Xcomp mode

Tobias Hartmann tobias.hartmann at oracle.com
Tue Mar 29 11:00:52 UTC 2016


Hi Vladimir,

looks good to me.

Best regards,
Tobias

On 29.03.2016 12:39, Vladimir Ivanov wrote:
> https://bugs.openjdk.java.net/browse/JDK-8152857
> 
> The test fails w/ -XX:-UseUnalignedAccesses in -Xcomp mode because inlining of Unsafe.getIntUnaligned() fails.
> 
> The fix [1] is to force the inlining to get the unsafe load constant folded.
> 
> Best regards,
> Vladimir Ivanov
> 
> [1]
> diff --git a/test/compiler/unsafe/UnsafeGetConstantField.java b/test/compiler/unsafe/UnsafeGetConstantField.java
> --- a/test/compiler/unsafe/UnsafeGetConstantField.java
> +++ b/test/compiler/unsafe/UnsafeGetConstantField.java
> @@ -46,6 +46,7 @@
>   *                         -XX:+FoldStableValues
>   * -XX:CompileCommand=dontinline,UnsafeGetConstantField.checkGetAddress()
>   *                         -XX:CompileCommand=dontinline,*.test*
> + *                         -XX:CompileCommand=inline,*Unsafe.get*
>   *                         -XX:-UseUnalignedAccesses
>   *                         compiler.unsafe.UnsafeGetConstantField
>   */


More information about the hotspot-compiler-dev mailing list