RFR: 8267265: Use new IR Test Framework to create tests for C2 IGV transformations [v4]

John Tortugo github.com+2249648+johntortugo at openjdk.java.net
Tue Oct 5 23:12:09 UTC 2021


On Fri, 17 Sep 2021 10:23:51 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> John Tortugo has updated the pull request incrementally with 146 additional commits since the last revision:
>> 
>>  - Fix merge mistake.
>>  - Merge branch 'jdk-8267265' of https://github.com/JohnTortugo/jdk into jdk-8267265
>>  - Addressing PR feedback: move tests to other directory, add custom tests, add tests for other optimizations, rename some tests.
>>  - 8273197: ProblemList 2 jtools tests due to JDK-8273187
>>    8273198: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh due to JDK-8273188
>>    
>>    Reviewed-by: naoto
>>  - 8262186: Call X509KeyManager.chooseClientAlias once for all key types
>>    
>>    Reviewed-by: xuelei
>>  - 8273186: Remove leftover comment about sparse remembered set in G1 HeapRegionRemSet
>>    
>>    Reviewed-by: ayang
>>  - 8273169: java/util/regex/NegativeArraySize.java failed after JDK-8271302
>>    
>>    Reviewed-by: jiefu, serb
>>  - 8273092: Sort classlist in JDK image
>>    
>>    Reviewed-by: redestad, ihse, dfuchs
>>  - 8273144: Remove unused top level "Sample Collection Set Candidates" logging
>>    
>>    Reviewed-by: iwalulya, ayang
>>  - 8262095: NPE in Flow$FlowAnalyzer.visitApply: Cannot invoke getThrownTypes because tree.meth.type is null
>>    
>>    Co-authored-by: Jan Lahoda <jlahoda at openjdk.org>
>>    Co-authored-by: Vicente Romero <vromero at openjdk.org>
>>    Reviewed-by: jlahoda
>>  - ... and 136 more: https://git.openjdk.java.net/jdk/compare/ac430bf7...463102e2
>
> test/hotspot/jtreg/compiler/c2/irTests/MulINodeIdealizationTests.java line 45:
> 
>> 43:     //Checks Max(a,b) * min(a,b) => a*b
>> 44:     public int excludeMaxMin(int x, int y){
>> 45:         return Math.max(x, y) * Math.min(x, y);
> 
> `Math.min/max()` is intrinsified and HotSpot generates `CMove` nodes (see `LibraryCallKit::generate_min_max()`) for them. But it looks like `MulNode::Ideal` misses this check for `CMove` nodes. That could be done in a separate RFE (and then this test could be improved to check if the `CMove` node was removed). 
> 
> Anyways, min/max nodes are mainly used for loop limit computations, so it's harder to test this transformation in an easy way.

Created this work item to address the suggestion: https://bugs.openjdk.java.net/browse/JDK-8274799

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

PR: https://git.openjdk.java.net/jdk/pull/5135


More information about the hotspot-compiler-dev mailing list