Integrated: 8287525: Extend IR annotation with new options to test specific target feature.

Swati Sharma duke at openjdk.java.net
Tue Jun 14 06:16:58 UTC 2022


On Thu, 2 Jun 2022 17:17:21 GMT, Swati Sharma <duke at openjdk.java.net> wrote:

> 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:-
> 
> - applyIfCPUFeatureAnd:
> 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.
> - applyIfCPUFeatureOr: 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 = {IRNode.ADD_VI,  "> 0"}, applyIfCPUFeatureOr = {"avx512bw", "true", "avx512f", "true"})
>     @IR(counts = {IRNode.ADD_VI,  "> 0"}, applyIfCPUFeatureAnd = {"avx512bw", "true", "avx512f", "true"})
> 
> Please review and share your feedback.
> 
> Thanks,
> Swati

This pull request has now been integrated.

Changeset: 03dca565
Author:    Swati Sharma <swati.sharma at intel.com>
Committer: Jatin Bhateja <jbhateja at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/03dca565cfcb3fb65a69ac6c59f062f1eeef87ac
Stats:     250 lines in 5 files changed: 237 ins; 0 del; 13 mod

8287525: Extend IR annotation with new options to test specific target feature.

Co-authored-by: Jatin Bhateja <jbhateja at openjdk.org>
Reviewed-by: chagedorn, kvn

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

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


More information about the hotspot-compiler-dev mailing list