RFR: 8268229: Aarch64: Use Neon in intrinsics for String.equals [v3]

Andrew Haley aph at openjdk.java.net
Mon Jul 5 09:19:52 UTC 2021


On Mon, 5 Jul 2021 08:18:24 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

>> Wang Huang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   unroll when small string sizes
>
> src/hotspot/cpu/aarch64/globals_aarch64.hpp line 96:
> 
>> 94:   product(bool, UseSimpleArrayEquals, false,                            \
>> 95:           "Use simpliest and shortest implementation for array equals") \
>> 96:   product(bool, UseSimpleStringEquals, true,                            \
> 
> Do we really need a user-facing toggle, especially a product one? Under what situations do we expect the user to change this? It's useful for comparison but if the new implementation if demonstrably better then we should just delete the old one.

True. But we've a way to go; taking this out should be the last step.

> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 4658:
> 
>> 4656:     // Main 32 byte comparison loop.
>> 4657:     __ bind(LOOP);
>> 4658:       __ ld1(v0, v1, __ T2D, Address(__ post(a1, loopThreshold)));
> 
> You need to reserve v0-3 as temporaries in the .ad file string_equals patterns otherwise we might be overwriting live values here.

There's no point pursuing the use of vector registers any more.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4423


More information about the hotspot-dev mailing list