RFR: 8318217: RISC-V: C2 VectorizedHashCode [v3]

Yuri Gaevsky duke at openjdk.org
Fri Nov 17 18:37:10 UTC 2023


On Thu, 16 Nov 2023 17:11:55 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Yuri Gaevsky has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Addressed most of suggestions for code improvements from @Hamlin-Li
>
> src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp line 1512:
> 
>> 1510:                                 + 0 * sizeof(jint))); // [31^^3:31^^4]
>> 1511: 
>> 1512:   bind(WIDE_LOOP);
> 
> Seems in this loop, tmp3 and tmp1 can share one register.

Done.

> src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp line 1515:
> 
>> 1513:   mulw(result, result, pow31_3_4); // 31^^4 * h
>> 1514:   DO_ELEMENT_LOAD(tmp1, 0);
>> 1515:   srli(tmp2, pow31_3_4, 32);
> 
> tmp2 can be calculated outside of the loop.

Done.

> src/hotspot/cpu/riscv/stubRoutines_riscv.cpp line 62:
> 
>> 60:          923521, // 0x000E1781
>> 61:           29791, // 0x0000745F
>> 62:             961, // 0x000003C1
> 
> based on the comment above about `pow31_2 `, line 62-64 can be removed now.

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16629#discussion_r1397723643
PR Review Comment: https://git.openjdk.org/jdk/pull/16629#discussion_r1397723313
PR Review Comment: https://git.openjdk.org/jdk/pull/16629#discussion_r1397723142


More information about the hotspot-dev mailing list