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

Fei Yang fyang at openjdk.org
Wed Nov 29 09:24:07 UTC 2023


On Wed, 29 Nov 2023 08:25:12 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> 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.
>
> Some more information:
> 1. `fcvt_w_s_safe` is quite similar to float16_to_float in cost, it's labeled in `fp_f2i`.
> 2. `float_compare` is too, but labeled with `pipe_class_default`
> 3.  while instruct's with multiple instructions in riscv_v.ad are labeled with `pipe_slow`.
> 
> I'm not sure what should be chosen here, seems `fcvt_w_s_safe` is more similar to our situation, how do you think about it?

I think we should `pipe_slow` here and for `fcvt_w_s_safe` and `float_compare` the multiple instruction cases. `fp_f2i` and `pipe_class_default` are supposed to be used for the single instruction cases.

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

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


More information about the hotspot-dev mailing list