Integrated: 8343944: C2: MinLNode::add_ring() computes _widen wrongly leading to an endless widening/compilation
Christian Hagedorn
chagedorn at openjdk.org
Wed Nov 13 08:42:43 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
This pull request has now been integrated.
Changeset: 2eeaa57b
Author: Christian Hagedorn <chagedorn at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/2eeaa57b19780723ad7c74b1a62dea491241b686
Stats: 81 lines in 2 files changed: 80 ins; 0 del; 1 mod
8343944: C2: MinLNode::add_ring() computes _widen wrongly leading to an endless widening/compilation
Reviewed-by: thartmann, rcastanedalo
-------------
PR: https://git.openjdk.org/jdk/pull/22033
More information about the hotspot-compiler-dev
mailing list