RFR: 8318217: RISC-V: C2 VectorizedHashCode [v7]
Hamlin Li
mli at openjdk.org
Fri Dec 1 17:04:12 UTC 2023
On Fri, 1 Dec 2023 07:49:48 GMT, Yuri Gaevsky <duke at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp line 1479:
>>
>>> 1477: case T_SHORT: BLOCK_COMMENT("arrays_hashcode(short) {"); break;
>>> 1478: case T_INT: BLOCK_COMMENT("arrays_hashcode(int) {"); break;
>>> 1479: default: BLOCK_COMMENT("arrays_hashcode {"); break;
>>
>> Is this `BLOCK_COMMENT("arrays_hashcode {"); break;` necessary?
>
> I have just borrrowed that part of code from X86 counterpart:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp#L3354
> It is a dead code so 'ShouldNotReachHere();' looks more appropriate here. Do you think we should fix this as a part of this patch or as some follow-ups for both x86/RISC-V?
Yes, as we already have `ShouldNotReachHere();` to guard the default case. How do you think about it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16629#discussion_r1412366205
More information about the hotspot-dev
mailing list