RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v6]

Emanuel Peter epeter at openjdk.org
Wed Mar 20 12:53:21 UTC 2024


On Tue, 19 Mar 2024 14:17:08 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/vectorization/TestRoundVectorDoubleRandom.java line 57:
>> 
>>> 55:   public static void main(String args[]) {
>>> 56:     TestFramework.runWithFlags("-XX:-TieredCompilation", "-XX:CompileThresholdScaling=0.3", "-XX:MaxVectorSize=16");
>>> 57:     TestFramework.runWithFlags("-XX:-TieredCompilation", "-XX:CompileThresholdScaling=0.3", "-XX:MaxVectorSize=32");
>> 
>> You should either drop the `"-XX:MaxVectorSize=16"`, or at least have a run without this flag.
>> There are machines with higher max vector length, i.e. AVX512 have `64`. Would be nice to test those too ;)
>
> Thanks for the suggestion.
> Unfortunately, I don't have access to a machine with AVX512, but I do run with a aarch64 via qemu where max vector size > 16, and it works with  "-XX:MaxVectorSize=16".
> The reason why the previous test failed (which I fixed in previous commit) with "-XX:MaxVectorSize=8", is because in test framework, it checks the length of vector and make sure it > length of double(8 bytes), i.e. at least 2*(length of Double).

Would it be an alternative to remove these here in the arguments, but instead to limit the IR rules, so that the IR rules are only checked if the MaxVectorSize is large enough?
Example you can look for: `applyIf = {"MaxVectorSize", ">=32"}`

I think you would just have a `applyIf = {"MaxVectorSize", ">=16"}`.
I will run the tests on our Oracle machines for AVX512, so don't worry about testing that.
Maybe you could also simulate a 64 byte register machine with SVE over qemu, but I leave that up to you.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1532024982


More information about the hotspot-compiler-dev mailing list