RFR: 8338126 : C2 SuperWord: VectorCastF2HF / vcvtps2ph produces wrong results for vector length 2 [v2]

Emanuel Peter epeter at openjdk.org
Tue Oct 15 07:04:11 UTC 2024


On Mon, 14 Oct 2024 23:35:43 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> When Float.floatToFloat16 is vectorized using a 2-element vector width due to dependencies, we incorrectly generate a 4-element vcvtps2ph with memory as destination storing 8 bytes instead of desired 4 bytes.  This issue is fixed in this PR by limiting the memory version of match rule to 4-element vector and above.
>> Also a regression test case is added accordingly.
>> 
>> Best Regards,
>> Sandhya
>
> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test case

Thanks for the updates! It looks good to me now.

I have one more wish:
Could you allow to run the test on all platforms please?
`test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java`

Currently, it only runs on selected platforms, see `@requires`. We should really run this on all platforms and compilers. The IR rules can be limited to platforms and features. That ensures that we do not have similar bugs elsewhere, and our test-coverage would be increased.

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

Marked as reviewed by epeter (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21480#pullrequestreview-2368347957


More information about the hotspot-compiler-dev mailing list