RFR: 8350835: C2 SuperWord: assert/wrong result when using Float.float16ToFloat with byte instead of short input

Emanuel Peter epeter at openjdk.org
Mon Mar 10 10:16:01 UTC 2025


On Fri, 7 Mar 2025 16:33:32 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> 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?

Personally, I generally prefer to have `failOn` IR rules, if we expect that at least for now there should be no vectorization. But add a comment why we expect no vectorization, so that if it ever does vectorize and the IR rule fails the person has a hint, and does not have to reverse-engineer too much. And if it turns out that we should one day vectorize, then we already have all these tests ready to just flip the `failOn` into `count`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23939#discussion_r1986987697


More information about the hotspot-compiler-dev mailing list