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

Aleksey Shipilev shade at openjdk.java.net
Wed Sep 15 11:08:25 UTC 2021


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

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

Commit messages:
 - Fix

Changes: https://git.openjdk.java.net/jdk/pull/5530/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5530&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273806
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5530.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5530/head:pull/5530

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


More information about the hotspot-compiler-dev mailing list