[lworld+fp16] RFR: 8339473: Add support for FP16 isFinite, isInfinite and isNaN [v4]
Bhavana Kilambi
bkilambi at openjdk.org
Thu Sep 26 08:39:51 UTC 2024
On Thu, 26 Sep 2024 03:51:37 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Bhavana Kilambi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add more regression tests for FP16 isFinite, isInfinite, isNaN
>
> Since Float16 is a value type, hence C2 will always create a scalarized IR "InlineTypeNode" for it even if we don't intrinsify it.
> Consider following byte code sequence of Float16.abs
> ![image](https://github.com/user-attachments/assets/c30b0c41-2139-4663-af6a-c0724033ce83)
>
> getfiled will directly return the scalar 'short' field which after subsequent logical and will return absolute value. I checked SVE does have direct instruction to negate IEEE 754 binary16 encoded value, but don't know about its latency and performance compared to logical operations. For x86, FP16 ISA does not have a direct negation instruction so java implementation should be equally performant.
@jatin-bhateja Sure, I'll look into replacing intrinsics with java code for other unary operations too (or wherever there's bit manipulation possible). Thanks for the explanation!
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1239#issuecomment-2376310583
More information about the valhalla-dev
mailing list