RFR: 8325674: Constant fold across compares [v2]

Joshua Cao duke at openjdk.org
Mon Feb 26 23:23:59 UTC 2024


On Mon, 26 Feb 2024 11:58:35 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Joshua Cao has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Modify tests to work with -XX:-TieredCompilation
>>  - Merge branch 'master' into cmpconstantfold
>>  - 8325674: Constant fold across compares
>
> src/hotspot/share/opto/subnode.cpp line 1580:
> 
>> 1578:             _test._test == BoolTest::eq || _test._test == BoolTest::ne) {
>> 1579:           cmp = CmpNode::make(phase->transform(SubNode::make(c1, cmp2, bt)), x,
>> 1580:                               bt);
> 
> Suggestion:
> 
>           cmp = CmpNode::make(phase->transform(SubNode::make(c1, cmp2, bt)), x, bt);

I added these suggestions. Is there any guidelines for number of columns? My editor auto-formats it to 80 columns following [clangd's defaults](https://llvm.org/docs/CodingStandards.html#source-code-width).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17853#discussion_r1503432591


More information about the hotspot-compiler-dev mailing list