RFR: 8287525: Extend IR annotation with new options to test specific target feature. [v2]
Swati Sharma
duke at openjdk.java.net
Wed Jun 8 12:41:39 UTC 2022
> Hi All,
>
> Currently test invocations are guarded by @requires vm.cpu.feature tags which are specified as the part of test tag specifications. This results into generating multiple test cases if some test points in a test file needs to be guarded by a specific features while others should still be executed in absence of missing target feature.
>
> This is specially important for IR checks based validation since C2 IR nodes creation may heavily rely on existence of specific target feature. Also, test harness executes test points only if all the constraints specified in tag specifications are met, thus imposing an OR semantics b/w @requires tag based CPU features becomes tricky.
>
> Patch extends existing @IR annotation with following two new options:-
>
> - applyIfTargetFeatureAnd:
> Accepts a list of feature pairs where each pair is composed of target feature string followed by a true/false value where a true value necessities existence of target feature and vice-versa. IR verifications checks are enforced only if all the specified feature constraints are met.
> - applyIfTargetFeatureOr: Accepts similar arguments as above option but IR verifications checks are enforced only when at least one of the specified feature constraints are met.
>
> Example usage:
> @IR(counts = {"AddVI", "> 0"}, applyIfTargetFeatureOr = {"avx512bw", "true", "avx512f", "true"})
> @IR(counts = {"AddVI", "> 0"}, applyIfTargetFeatureAnd = {"avx512bw", "true", "avx512f", "true"})
>
> Please review and share your feedback.
>
> Thanks,
> Swati
Swati Sharma has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'openjdk:master' into JDK-8287525
- 8287525: Extend IR annotation with new options to test specific target feature.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8999/files
- new: https://git.openjdk.java.net/jdk/pull/8999/files/88e24ec3..87454472
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8999&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8999&range=00-01
Stats: 15722 lines in 583 files changed: 12093 ins; 1975 del; 1654 mod
Patch: https://git.openjdk.java.net/jdk/pull/8999.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8999/head:pull/8999
PR: https://git.openjdk.java.net/jdk/pull/8999
More information about the hotspot-compiler-dev
mailing list