RFR: 8309894: compiler/vectorapi/VectorLogicalOpIdentityTest.java fails on SVE system with UseSVE=0 [v2]
Xiaohong Gong
xgong at openjdk.org
Mon Jul 3 10:19:09 UTC 2023
> This test fails with several IR check failures when run on ARM SVE systems with vm option `-XX:UseSVE=0`. Here is one of the failed IR rule:
>
>
> @IR(counts = {IRNode.AND_V, "1"}, applyIfCPUFeatureOr = {"sve", "true", "avx512", "true"})
> public static void testAndMaskSameValue1()
>
> The specified IR in the test depends on the platform's predicate feature. Hence the IR check can be applied only on ARM SVE or X86 AVX512 systems. But with `-XX:UseSVE=0` on ARM SVE machines, JVM will disable SVE feature for compiler. But the CPU feature is not changed. To guarantee the IR rule is run with SVE as expected, it has to add another condition like `applyIf = {"UseSVE", ">0"}`. Consider `UseSVE` is an ARM specific option, it can be used only on ARM CPUs. So the right IR rules should be:
>
>
> @IR(counts = {IRNode.AND_V, "1"}, applyIfCPUFeature = {"sve", "true"}, applyIf = {"UseSVE", "> 0"})
> @IR(counts = {IRNode.AND_V, "1"}, applyIfCPUFeature = {"avx512", "true"})
> public static void testAndMaskSameValue1()
>
>
> This patch also changes the check order of conditions for a IR rule. It's better to check `applyIfCPUFeature` before `applyIf`, in case the vm option is invalid on running hardware, which makes test throw exception and abort.
>
> Verified on X86 systems with `UseAVX=1/2/3` by removing the test from ProblemList.txt, and SVE systems with `UseSVE=0/1`.
Xiaohong Gong has updated the pull request incrementally with one additional commit since the last revision:
Address review comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14533/files
- new: https://git.openjdk.org/jdk/pull/14533/files/de33dd21..7c57d5e5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14533&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14533&range=00-01
Stats: 6 lines in 2 files changed: 2 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/14533.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14533/head:pull/14533
PR: https://git.openjdk.org/jdk/pull/14533
More information about the hotspot-compiler-dev
mailing list