RFR: 8364305: Support AVX10 saturating floating point conversion instructions [v14]

Mohamed Issa missa at openjdk.org
Thu Sep 18 07:40:50 UTC 2025


On Sat, 13 Sep 2025 08:26:13 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Mohamed Issa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Introduce scalar floating point conversion tests with IR rules
>
> test/hotspot/jtreg/compiler/floatingpoint/ScalarFPtoIntCastTest.java line 70:
> 
>> 68:             float_arr[i] = ran.nextFloat(floor_val, ceil_val);
>> 69:             double_arr[i] = ran.nextDouble(floor_val, ceil_val);
>> 70:         }
> 
> Please use Generators instead of direct initialization.

I could do it for int and long. If there's a compact way to do it for the other types, please let me know.

> test/hotspot/jtreg/compiler/floatingpoint/ScalarFPtoIntCastTest.java line 89:
> 
>> 87:             if (int_arr[i] != expected) {
>> 88:                 throw new RuntimeException("Invalid result: int_arr[" + i + "] = " + int_arr[i] + " != " + expected);
>> 89:             }
> 
> Use Verify.checkEQ instead.

Ok, I'm using Verify.checkEQ instead.

> test/hotspot/jtreg/compiler/floatingpoint/ScalarFPtoIntCastTest.java line 109:
> 
>> 107:             if (long_arr[i] != expected) {
>> 108:                 throw new RuntimeException("Invalid result: long_arr[" + i + "] = " + long_arr[i] + " != " + expected);
>> 109:             }
> 
> Use Verify.checkEQ, checkout relevant code in https://github.com/openjdk/jdk/tree/master/test/hotspot/jtreg/compiler/lib and their usages

I modified this. Should I do this for VectorFPtoIntCastTest.java as well? Also, using Verify.checkEQ removes the custom error message unless I use try + catch.

> test/hotspot/jtreg/compiler/floatingpoint/ScalarFPtoIntCastTest.java line 122:
> 
>> 120:         checkf2short();
>> 121:     }
>> 122: 
> 
> What is the reason behind additional level of abstraction when now manually inline this code.

No reason other than I migrated the code from VectorFPtoIntCastTest.java, so it's gone now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26919#discussion_r2357853486
PR Review Comment: https://git.openjdk.org/jdk/pull/26919#discussion_r2357856425
PR Review Comment: https://git.openjdk.org/jdk/pull/26919#discussion_r2357863945
PR Review Comment: https://git.openjdk.org/jdk/pull/26919#discussion_r2357866615


More information about the hotspot-compiler-dev mailing list