RFR: 8315377: C2: assert(u->find_out_with(Op_AddP) == nullptr) failed: more than 2 chained AddP nodes?

Vladimir Kozlov kvn at openjdk.org
Tue Sep 5 17:22:41 UTC 2023


On Mon, 4 Sep 2023 15:51:34 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> `PhaseIdealLoop::try_sink_out_of_loop()` has special logic to handle
> `AddP` nodes so, after it has been processed, all nodes in the chain
> of `AddP` nodes still have the same base input. That logic assumes a
> chain is only composed of at most 2 nodes. That's not true because
> `PhaseIdealLoop::remix_address_expressions()` can cause longer chains
> to exist. There's actually no clear upper bound on the number of nodes
> in such a chain. The fix I propose here is simply to extend the logic
> in `PhaseIdealLoop::try_sink_out_of_loop()` to handle arbitrary
> chains.

Looks good to me too.

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15562#pullrequestreview-1611580393


More information about the hotspot-compiler-dev mailing list