Integrated: 8312440: assert(cast != nullptr) failed: must have added a cast to pin the node
Roland Westrelin
roland at openjdk.org
Thu Jul 27 07:28:00 UTC 2023
On Mon, 24 Jul 2023 14:26:48 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> The test has a loop nest with 2 loops. A node is sunk out of the inner
> loop. A cast is created to pin the node out of loop. The logic added
> by 8308103 looks for an existing cast with the same inputs. It finds
> one and uses that one. That existing cast was created before the
> current round of loop opts. Eventhough it has the right out of inner
> loop (but in outer loop) control input, it was assigned a control out
> of both loops (the control is legal, it just happens that no use keeps
> the cast in the outer loop). Next, the same node is sunk out of the
> outer loop. The logic for sinking nodes looks for an input in the
> outer loop (otherwise why would the node be in the outer loop) and
> find none even though there should be one. The assert fires. The
> reason is that the cast input has control out of loop. The fix I
> propose is to not use an existing cast if it doesn't have the expected
> control.
This pull request has now been integrated.
Changeset: 01e135c9
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/01e135c91018a41800c2df534b1d6dbd396adbf4
Stats: 58 lines in 2 files changed: 57 ins; 0 del; 1 mod
8312440: assert(cast != nullptr) failed: must have added a cast to pin the node
Reviewed-by: chagedorn, kvn, thartmann
-------------
PR: https://git.openjdk.org/jdk/pull/14999
More information about the hotspot-compiler-dev
mailing list