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

Andrew Dinn adinn at openjdk.org
Wed Jul 27 11:29:57 UTC 2022


On Wed, 27 Jul 2022 07:04:25 GMT, Hao Sun <haosun at openjdk.org> wrote:

> 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

Good.

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

Marked as reviewed by adinn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list