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:23:20 UTC 2023


On Mon, 2 Oct 2023 08:59:45 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> 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.

Update: Not necessary

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

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


More information about the hotspot-compiler-dev mailing list