RFR: 8290943: Fix several IR test issues on SVE after JDK-8289801

Hao Sun haosun at openjdk.org
Wed Jul 27 07:12:29 UTC 2022


This patch was motivated by the test failure of
TestPopCountVectorLong.java on SVE with UseSVE=0 after JDK-8289801.

Both CPU feature CPU_SVE and VM option UseSVE should be checked to
determine whether the SVE codegen part is available.

Hence, 1) if one test case is designed to test multiple backends, we
should specify this full check in the "requires" annotation, e.g.,
TestPopCoundVectorLong.java. 2) if one test case is designed to test
only SVE backend, we may also specify UseSVE option to "runWithFlags()"
in "main" function and only check CPU feature in "requires" annotation
part, e.g., VectorMaskedNotTest.java[1].

This test failure can be easily resolved via adding the full check in
the "requires" annotation.

We further revisited all the SVE-oriented JTREG test cases and found two
potential issues.

1) AllBitsSetVectorMatchRuleTest.java
It's designed to test both NEON and SVE codegen. Since 1) ASIMD is the
mandatory feature on SVE platforms and 2) SVE codegen would be selected
by default on SVE platforms, it's no need to require SVE feature.

2) TestPopulateIndex.java
Similar to TestPopCountVectorLong.java, this case is expected to fail as
well on SVE with UseSVE=0. However, it didn't fail. The root cause is
that it's not correct to simply check the "PopulateIndex" string because
the test name i.e. TestPopulateIndex.java contains this string as well.
Instead, we turn to check IRNode name.

Testing:
We ran the following vector test cases on 1) NEON-only platform, 2) SVE
platform with UseSVE=0 specified, 3) SVE platform with UseSVE not
specified(default on), 4) x64 platform. All the test cases passed.


  hotspot:compiler/vectorapi
  jdk:jdk/incubator/vector
  hotspot:compiler/vectorization


[1] https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/vectorapi/VectorMaskedNotTest.java#L116

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

Commit messages:
 - 8290943: Fix several IR test issues on SVE after JDK-8289801

Changes: https://git.openjdk.org/jdk/pull/9653/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9653&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8290943
  Stats: 8 lines in 4 files changed: 2 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/9653.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9653/head:pull/9653

PR: https://git.openjdk.org/jdk/pull/9653


More information about the hotspot-compiler-dev mailing list