RFR: 8339738: RISC-V: Vectorize crc32 intrinsic [v4]
Fei Yang
fyang at openjdk.org
Wed Sep 11 08:06:23 UTC 2024
On Wed, 11 Sep 2024 07:52:14 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> Not sure if I understand your suggestion correctly. Do you mean something like below?
>>
>> address generate_updateBytesCRC32() {
>> if (UseRVV) { kernel_crc32_using_vector(); }
>> else { kernel_crc32(...); }
>> }
>>
>> But as kernel_crc32_using_vector reuses the code in kernel_crc32, and even with UseRVV, in some condition (when size is not large enough) we still need to fallback to L_unroll_loop_entry.
>> Or maybe I could misunderstand what you mean?
>
> In a summary, the code paths are went through in following order: vector(optional) -> loop unroll -> other scalar cases, it depens on data size + UseRVV. So in UseRVV case, we need all the code path.
Ah, I see. Regarding the "offset is too large" issue, could the far versions of these branches help? I mean setting the `is_far` parameters to true [1].
[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp#L670-L675
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20910#discussion_r1753503826
More information about the hotspot-dev
mailing list