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

Sandhya Viswanathan sviswanathan at openjdk.org
Wed Oct 16 01:39:51 UTC 2024


On Tue, 15 Oct 2024 08:08:59 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update test case
>
> src/hotspot/cpu/x86/x86.ad line 3679:
> 
>> 3677: 
>> 3678: instruct vconvF2HF_mem_reg(memory mem, vec src) %{
>> 3679:   predicate(Matcher::vector_length_in_bytes(n->in(3)->in(1)) >= 16);
> 
> You can add an eligant prediction check like following instead of accesing bare inputs.
> 
> n->as_StoreVector()->memory_size() >= 16.

We have used bare inputs at many places in the ad file in the predicate.

> test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java line 110:
> 
>> 108:         }
>> 109: 
>> 110:         // Verifying the result
> 
> Since we are using IR framework, we can leverage existing[ @Check](https://github.com/openjdk/jdk/blob/521effe017b9b6322036f1851220056a637d6b1c/test/hotspot/jtreg/compiler/lib/ir_framework/Check.java#L32) annotation for verification which works in conjunction with @Test method, it will automatically invoke validation after test method execution. We may need little refactoring for this.

The added test follows the verification mechanism used already in the test. I would prefer not to get into refactoring.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21480#discussion_r1802214527
PR Review Comment: https://git.openjdk.org/jdk/pull/21480#discussion_r1802214007


More information about the hotspot-compiler-dev mailing list