RFR: 8263707: C1 RangeCheckEliminator support constant array and NewMultiArray [v2]
Hui Shi
hshi at openjdk.java.net
Wed Mar 24 03:45:40 UTC 2021
On Tue, 23 Mar 2021 07:43:23 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
>> Looks good to me. I've also executed some internal testing and it all passed.
>
>> > Do you have any test that exercises this code path?
>>
>> @neliasso
>>
>> I have an example case in JBS https://bugs.openjdk.java.net/secure/attachment/93668/range_check.java. Do you suggest adding a test case to check if RC is removed as expected?
>
> Yes - please do that. Look at the tests in open/test/hotspot/jtreg/compiler/c1 (for example RangeCheckVerificationOfIR.java).
@neliasso
Test is added by checking if rangchecks are eliminated in given cases. -XX:+TraceRangeCheckElimination is added when launch C1 compilation, OutputAnalyzer is used to count how many RCs are eliminated. This test can only run with debug build.
RangeCheckVerificationOfIR.java constructs all kinds of CFG with loops expect pass assertions in C1 code. Actually it doesn't dump IR and check.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3041
More information about the hotspot-compiler-dev
mailing list