RFR: 8310268: RISC-V: misaligned memory access in String.Compare intrinsic [v2]

Vladimir Kempik vkempik at openjdk.org
Fri Jul 14 13:31:15 UTC 2023


On Thu, 13 Jul 2023 09:39:05 GMT, Fei Yang <fyang at openjdk.org> wrote:

> OK. I have went through the changes in function `generate_compare_long_string_different_encoding` and here is what I am thinking. I see there are two purposes for these changes:
> 
> 1. Make sure that the memory accesses happened in `SMALL_LOOP` 8-bytes aligned on strL;
> 2. Avoid unaligned accessed in the loop tail (the if-else structure with AvoidUnalignedAccesses check);
> 
> I am fine with the changes for the first purpose. In fact, my previous comment was about the second one. Since it's the loop tail, making using of misaligned_load (and thus eliminating the if block) shouldn't affect much. Please consider that.

THank you for looking at this, I'll try simplifying the tail and will test performance as soon as I find some time.

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

PR Comment: https://git.openjdk.org/jdk/pull/14534#issuecomment-1635866723


More information about the hotspot-dev mailing list