RFR: 8340732: RISC-V: Refactor crc32 scalar version
Hamlin Li
mli at openjdk.org
Wed Sep 25 07:45:36 UTC 2024
On Wed, 25 Sep 2024 07:24:32 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Hi,
>> Can you help to review this patch?
>> As discussed in https://github.com/openjdk/jdk/pull/20910#discussion_r1755150447, it's helpful to refactor the existing scalar version of crc32 intrinsic.
>> Several refactoring are done in this pr,
>> 1. Simplify the `len` usage, now it only decreases (i.e. change in one direction)
>> 2. Simplify the code paths
>> 3. Remove one instruction in `L_by4_loop`
>> 4. Remove unnecessary code
>> 5. Other misc
>>
>> Thanks!
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 1621:
>
>> 1619:
>> 1620: bind(L_by1_loop);
>> 1621: blez(len, L_exit);
>
> Since `len` will never be lower than zero, maybe `beqz` is more accurate here?
Yes, will do it and below ones.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21150#discussion_r1774709253
More information about the hotspot-dev
mailing list