RFR: 8268229: Aarch64: Use Neon in intrinsics for String.equals
Dong Bo
dongbo at openjdk.java.net
Thu Jun 10 06:19:17 UTC 2021
On Wed, 9 Jun 2021 08:28:37 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 4807:
>>
>>> 4805: mov(tmp2, v0, T2D, 1);
>>> 4806: cbnz(tmp2, DONE);
>>> 4807: b(SAME);
>>
>> Shouldn't this be
>>
>> mov(tmp1, v0, T2D, 0);
>> mov(tmp2, v0, T2D, 1);
>> orr(tmp1, tmp1, tmp2);
>> cbnz(tmp1, DONE);
>>
>>
>> ... which would use up fewer branch prediction resources.
>
> ... or maybe do the OR in the vector unit?
I guess it can be done with:
umaxv(v1, T4S, v0);
mov(tmp1, v1, T4S, 0);
cbnz(tmp1, DONE0);
-------------
PR: https://git.openjdk.java.net/jdk/pull/4423
More information about the hotspot-dev
mailing list