RFR 8249893: AARCH64: optimize the construction of the value from the bits of the other two

Boris Ulasevich boris.ulasevich at bell-sw.com
Tue Aug 25 06:40:57 UTC 2020


Hi Andrew,

 > This looks rather nice.

Thank you!

 > How did you test it?

I have run JCK and JTREG tests on arm and intel platforms (the 
transformation
works in many places: StringUTF16, BigInteger, ZipUtils, etc).

I checked that benchmark [1] shows positive results on both single call and
vectorized case (adding the benchmarking code in a simple cycle).

I checked with +PrintAssembly that expressions are generated as expected:
((v1 & 0xFF) << 24) | ((v2 & 0xFF) << 16) | ((v3 & 0xFF) << 8) | (v4 & 0xFF)

I ran the generated brute force tests [2] that checks all possible 
mask/shift
combinations for int/long types: (value1 & mask1) | ((value1 & mask2) << 
shift)

thanks,
Boris

[1] http://cr.openjdk.java.net/~bulasevich/8249893/webrev.01/Benchmark.java
[2] http://cr.openjdk.java.net/~bulasevich/8249893/webrev.00/Gen.java

On 24.08.2020 20:31, Andrew Haley wrote:
> On 23/08/2020 19:20, Boris Ulasevich wrote:
>> With the current change all the transformation logic is moved out of
>> aarch64.ad file into the common C2 code.
>>
>> http://bugs.openjdk.java.net/browse/JDK-8249893
>> http://cr.openjdk.java.net/~bulasevich/8249893/webrev.01
>>
>> The change in compiler.cpp was done to implicitly ask IGVN to run
>> the idealization once again after the loop optimization phase.
>> This extra step is necessary to make the BFI transform happen
>> only after loop optimization.
>
> This looks rather nice. How did you test it?
>



More information about the hotspot-compiler-dev mailing list