RFR: 8287525: Extend IR annotation with new options to test specific target feature. [v5]
Swati Sharma
duke at openjdk.java.net
Fri Jun 10 11:25:11 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 incrementally with one additional commit since the last revision:
8287525: Resolved review comments.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/8999/files
- new: https://git.openjdk.org/jdk/pull/8999/files/5f02f608..f7dcf317
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8999&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8999&range=03-04
Stats: 18 lines in 1 file changed: 1 ins; 0 del; 17 mod
Patch: https://git.openjdk.org/jdk/pull/8999.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/8999/head:pull/8999
PR: https://git.openjdk.org/jdk/pull/8999
More information about the hotspot-compiler-dev
mailing list