RFR: 8278471: Remove unreached rules in AddNode::IdealIL [v4]

Vladimir Kozlov kvn at openjdk.java.net
Thu Dec 16 01:37:02 UTC 2021


On Thu, 16 Dec 2021 01:24:45 GMT, Zhiqiang Zang <duke at openjdk.java.net> wrote:

>> Reorder optimizations in addnode so special cases appear before general cases; otherwise the special cases would be never covered.
>> 
>> `(a - b) + (c - d)` subsumes both `(a - b) + (b - c)` and `(a - b) + (c - a)`. Therefore `(a - b) + (b - c)` and `(a - b) + (c - a)` have to be placed before `(a - b) + (c - d)` so that they can work.
>
> Zhiqiang Zang has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Add missing optimizations "(A+X) - (X+B)" and "(X+A) - (B+X)" for long type.
>  - Include an ir test to verify the removed optimizations really happended already.

Good.

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

Marked as reviewed by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list