[jdk17] Integrated: 8269088: C2 fails with assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect

Roland Westrelin roland at openjdk.java.net
Thu Jul 1 08:15:09 UTC 2021


On Thu, 24 Jun 2021 07:39:52 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> In PhaseIdealLoop::try_sink_out_of_loop(), a Store is not expected to
> be a candidate for sinking: if a Store is in a loop, there has to be
> at least a memory Phi keeping the Store in the loop. In the case of
> the failure, a Store has control set in a loop but the Store is not
> connected to a loop memory Phi. The reason for that is that the Store
> was moved out of loop by PhaseIdealLoop::try_move_store_after_loop()
> which moved the Store to the lca of its uses (other than the loop
> Phi), in this case another loop.
> 
> It doesn't look right that a Store is removed from a loop only to be
> added to another one so I propose fixing that by placing the Store
> right out of the loop it's being moved out of (similar to
> PhaseIdealLoop::try_sink_out_of_loop()) rather than at the lca of
> uses.

This pull request has now been integrated.

Changeset: ad27d9b3
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.java.net/jdk17/commit/ad27d9b3eca0ebaa5d920af0d3d4c43b3fa6c5f8
Stats:     86 lines in 2 files changed: 85 ins; 0 del; 1 mod

8269088: C2 fails with assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect

Reviewed-by: kvn, iveresov, neliasso

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

PR: https://git.openjdk.java.net/jdk17/pull/133


More information about the hotspot-compiler-dev mailing list