RFR: 8280120: [IR Framework] Add attribute to @IR to enable/disable IR matching based on the architecture [v2]

Emanuel Peter epeter at openjdk.org
Mon Oct 2 09:05:03 UTC 2023


On Wed, 27 Sep 2023 11:54:25 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

>> Daniel Skantz has updated the pull request incrementally with five additional commits since the last revision:
>> 
>>  - test method name
>>  - whitespace
>>  - whitespace
>>  - platformFeature to platform. Lint docs. Add more tests.
>>  - Add more platforms in IREncodingPrinter.java
>
> test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPreconditions.java line 110:
> 
>> 108:     public static void testApplyBoth4() {}
>> 109: 
>> 110: }
> 
> Maybe you could complete these tests with a couple more tests that check the evaluation order rules w.r.t. VM flag and CPU feature pre-conditions, something like:
> 
> 
>     @Test
>     @IR(applyIfPlatformFeatureAnd = {"x64", "true", "aarch64", "true"},
>         applyIf = {"UseNonExistingFlag", "true"},
>         counts = {IRNode.LOOP, ">= 1000"})
>     public static void testPlatformFeaturePrecedenceOverVMFlags() {}
> 
>     @Test
>     @IR(applyIfPlatformFeatureAnd = {"x64", "true", "aarch64", "true"},
>         applyIfCPUFeature = {"non-existing-cpu-feature", "true"},
>         counts = {IRNode.LOOP, ">= 1000"})
>     public static void testPlatformFeaturePrecedenceOverCPUFeatures() {}

Good idea! We got something similar wrong recently, so this is a must.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15938#discussion_r1342439941


More information about the hotspot-compiler-dev mailing list