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

Roland Westrelin roland at openjdk.org
Wed Sep 6 07:25:38 UTC 2023


On Tue, 5 Sep 2023 07:52:24 GMT, Christian Hagedorn <chagedorn 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!

@chhagedorn @vnkozlov @TobiHartmann thanks for the reviews.

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

PR Comment: https://git.openjdk.org/jdk/pull/15562#issuecomment-1707808744


More information about the hotspot-compiler-dev mailing list