RFR: 8273806: compiler/cpuflags/TestSSE4Disabled.java should test for CPU feature explicitly

Tobias Hartmann thartmann at openjdk.java.net
Thu Sep 16 07:44:49 UTC 2021


On Wed, 15 Sep 2021 10:59:12 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> JDK-8158214 added a test that verifies that machines with SSE4 support do not crash when lower SSE level is required. But it tests for CPU capabilities weirdly.
> 
> This _tangentially_ manifests when running the test with Zero:
> 
> 
> $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=compiler/cpuflags/TestSSE4Disabled.java
> ...
> STDERR:
> Unrecognized VM option 'UseSSE=3'
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> 
> 
> I think we can test that target CPU supports SSE4, and only run the test then. It would implicitly fix Zero test failure too, as Zero impersonates a "generic" featureless CPU. Plus, it would stop running the -Xcomp test on arches that do not actually need this test to run.
> 
> Additional testing:
>  - [x] Linux x86_64 Server, TR 3970X, affected test still runs
>  - [x] Linux x86_64 Zero, TR 3970X, affected test is now skipped

I just wanted to say "Looks good to me but the author of the test should also have a look" but then I noticed that I'm the author. So: Looks good and trivial to me :)

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

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5530


More information about the hotspot-compiler-dev mailing list