RFR: 8342677: Add IR validation tests for newly added saturated vector add / sub operations [v2]

Jatin Bhateja jbhateja at openjdk.org
Sun Dec 1 08:51:33 UTC 2024


On Fri, 29 Nov 2024 06:43:08 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review resolutions
>
> test/hotspot/jtreg/compiler/vectorapi/VectorSaturatedOperationsTest.java line 97:
> 
>> 95:                     short_in2[i] = (short)-i;
>> 96:                     byte_in1[i]  = Byte.MIN_VALUE;
>> 97:                     byte_in2[i]  = (byte)-i;
> 
> Are these values sufficient?
> 
> Example with `SADD_VL`:
> if the itt elements are `max_value` and `min_value` -> no overflow -> `-1`
> if the ith elements are `-i` and `i` -> no overflow -> `0`
> 
> So it seems we are actually not testing the saturation here, am I correct?

I am now randomizing input, and explicitly setting delimiting test inputs.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21603#discussion_r1864786273


More information about the hotspot-compiler-dev mailing list