RFR: 8343944: C2: MinLNode::add_ring() computes _widen wrongly leading to an endless widening/compilation
Christian Hagedorn
chagedorn at openjdk.org
Tue Nov 12 10:52:55 UTC 2024
On Tue, 12 Nov 2024 10:07:24 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> In `MinLNode::add_ring()`, we wrongly take the minimum of the `_widen`of both input types instead of the maximum which leads to an endless widening in CCP without reaching a fixed point with the test case. We eventually hit the memlimit because we keep creating new types endlessly.
>
> The fix is straight forward to use `MAX2()` instead of `MIN2()` as we are already doing for `MinINode::add_ring()`:
> https://github.com/openjdk/jdk/blob/b53ee053f7f7ffcf02ff47e1895ce7be4bc32486/src/hotspot/share/opto/addnode.cpp#L1437-L1443
>
> Details about how this endless widening is happening are provided as comments in the test case.
>
> Thanks,
> Christian
Thanks Tobias!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22033#issuecomment-2470204011
More information about the hotspot-compiler-dev
mailing list