Integrated: 8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT

Cesar Soares Lucas cslucas at openjdk.org
Wed Sep 17 16:54:53 UTC 2025


On Wed, 3 Sep 2025 00:53:59 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:

> Please, review this patch to fix issue that may occur when reducing allocation merge.
> 
> As the assert message describe, the problem is a `Phi` considered reducible during one invocation of  `adjust_scalar_replaceable_state` turned out to be later non-reducible. This situation can happen if a subsequent invocation of the same method causes all inputs to the phi to be NSR; therefore there is no point in reducing the Phi. It can also happen during the propagation of NSR state done by `find_scalar_replaceable_allocs`. 
> 
> The change in `revisit_reducible_phi_status` is just a clean-up.
> The real fix is in `find_scalar_replaceable_allocs`.
> 
> Tested on Linux x64/Aarch64 release/fastdebug with JTREG tier1-3.

This pull request has now been integrated.

Changeset: 6f493b4d
Author:    Cesar Soares Lucas <cslucas at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6f493b4d2e7120cbe34fb70d595f7626655b47a9
Stats:     71 lines in 2 files changed: 71 ins; 0 del; 0 mod

8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT

Reviewed-by: rcastanedalo

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

PR: https://git.openjdk.org/jdk/pull/27063


More information about the hotspot-compiler-dev mailing list