RFR: 8310268: RISC-V: misaligned memory access in String.Compare intrinsic [v3]
Vladimir Kempik
vkempik at openjdk.org
Mon Jul 24 07:38:47 UTC 2023
On Mon, 24 Jul 2023 06:02:44 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Vladimir Kempik has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Simplify case for long LU UL compares
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2368:
>
>> 2366:
>> 2367: // make sure main loop is 8 byte-aligned, we should load another 4 bytes from strL
>> 2368: __ beqz(cnt2, DONE); // no characters left
>
> I don't quite understand this newly-added branch. If the intention was to ensure that we have at lease 4 chars left, shoudn't we compare with 4 instead? But given that the const `STUB_THRESHOLD` is (64 + 8) in C2_MacroAssembler::string_compare, I think neigher will be taken.
you right, that looks to be a sanity check where the branch will never be taken, will remove both
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14534#discussion_r1271863906
More information about the hotspot-dev
mailing list