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

Andrew Haley aph at openjdk.java.net
Fri Jul 2 14:32:56 UTC 2021


On Fri, 2 Jul 2021 14:25:07 GMT, Andrew Haley <aph 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/stubGenerator_aarch64.cpp line 4670:
> 
>> 4668:       __ cbnz(rscratch1, NOT_EQUAL);
>> 4669:       __ br(__ GE, LOOP);
>> 4670: 
> 
> As I said before, we gain nothing by using Neon here.

Much better:


+	__ ldp(r5, r6, Address(__ post(a1, wordSize * 2)));
+	__ ldp(rscratch1, rscratch2, Address(__ post(a2, wordSize * 2)));
+	__ cmp(r5, rscratch1);
+	__ ccmp(r6, rscratch2, 0, Assembler::EQ);
+	__ br(__ NE, NOT_EQUAL);

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

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


More information about the hotspot-dev mailing list