RFR: 8350835: C2 SuperWord: assert/wrong result when using Float.float16ToFloat with byte instead of short input
Sandhya Viswanathan
sviswanathan at openjdk.org
Fri Mar 7 16:35:52 UTC 2025
On Fri, 7 Mar 2025 07:48:07 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Float.float16ToFloat generates wrong vectorized code in product build and asserts in fastdebug/debug when argument is of type byte, int, or long array. The short term solution is to not auto vectorize in these cases.
>>
>> Review comments are welcome.
>>
>> Best Regards,
>> Sandhya
>
> test/hotspot/jtreg/compiler/vectorization/TestFloat16ToFloatConv.java line 62:
>
>> 60: }
>> 61:
>> 62: @Test
>
> Suggestion:
>
> @Test
> @IR(failOn = { IRNode.VECTOR_CAST_HF2F }, applyIfCPUFeatureOr = { "avx512vl", "true", "f16c", "true" })
I left out the IR check because we do intend to vectorize this going forward. Instead the bug fix is verified by checkResult. Also the fix is not specific to Intel platform so if we do add IR check it will need to be generic.
@eme64 your thoughts please? Would you like to see an IR check here that vectorization is not happening?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23939#discussion_r1985366520
More information about the hotspot-compiler-dev
mailing list