RFR: 8318227: RISC-V: C2 ConvHF2F [v2]

Hamlin Li mli at openjdk.org
Tue Nov 28 13:49:37 UTC 2023


On Tue, 28 Nov 2023 11:04:01 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   optimize perf with stub out-of-line
>
> src/hotspot/cpu/riscv/riscv.ad line 8288:
> 
>> 8286:     __ float16_to_float($dst$$FloatRegister, $src$$Register, $tmp$$Register);
>> 8287:   %}
>> 8288:   ins_pipe(fp_f2i);
> 
> Seems we should use `ins_pipe(pipe_slow)` here as this emits multiple instructions.

In fact, I'm not quite sure.
I see in the ad file:

pipe_class pipe_slow()
%{
  instruction_count(10);


and, all instruct's with `pipe_slow` are related to cmpxchg, which indeed involve lots of instructions in common case.
But for `float16_to_float`, in normal case, there is at most 5 instructions; only the rare case `NaN` involves more instructions.

Please let me know how do you think about it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16802#discussion_r1407789888


More information about the hotspot-dev mailing list