RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter [v4]

Vladimir Kozlov kvn at openjdk.org
Wed Mar 8 21:22:25 UTC 2023


On Wed, 8 Mar 2023 19:04:01 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove RISC-V port code for float16 intrinsics
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 451:
> 
>> 449:   assert(StubRoutines::f2hf() != nullptr, "floatToFloat16 intrinsic is not supported on this platform");
>> 450:   typedef jshort (*f2hf_stub_t)(jfloat x);
>> 451:   return ((f2hf_stub_t)StubRoutines::f2hf())(x);
> 
> What's the point of keeping the wrappers around? The stubs can be called directly, can't they?

I wanted isolate function type cast and assert in one place.
BTW the comment in assert should be "the stub is not implemented on this platform".

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

PR: https://git.openjdk.org/jdk/pull/12869


More information about the hotspot-compiler-dev mailing list