RFR: 8352635: Improve inferencing of Float16 operations with constant inputs [v11]

Emanuel Peter epeter at openjdk.org
Thu Jun 19 07:11:30 UTC 2025


On Thu, 19 Jun 2025 06:57:51 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> This is a follow-up PR#22755 to improve Float16 operations inferencing.
>> 
>> The existing scheme to detect Float16 operations for some operations is based on pattern matching which expects to receive inputs through ConvHF2F IR, this patch extends matching to accept constant floating point inputs within the Float16 value range.
>> 
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adding a stricter constant type check

src/hotspot/share/opto/convertnode.cpp line 285:

> 283:     if (conF != nullptr &&
> 284:         varS != nullptr &&
> 285:         conF->bottom_type()->isa_float_constant() &&

Yes, it might well have come from here, because `is_float_constant` asserts if it is not a float constant.

But now you have an implicit null check, right? You should make it explicit, as per the guidelines.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24179#discussion_r2156298450


More information about the hotspot-compiler-dev mailing list