RFR: 8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT [v4]
Cesar Soares Lucas
cslucas at openjdk.org
Tue Sep 16 02:35:01 UTC 2025
> 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.
Cesar Soares Lucas has updated the pull request incrementally with two additional commits since the last revision:
- Merge remote-tracking branch 'refs/remotes/origin/ram-non-reducible' into ram-non-reducible
- Merge consecutive ifs
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27063/files
- new: https://git.openjdk.org/jdk/pull/27063/files/28d9432e..2236348b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27063&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27063&range=02-03
Stats: 7 lines in 1 file changed: 0 ins; 2 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/27063.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27063/head:pull/27063
PR: https://git.openjdk.org/jdk/pull/27063
More information about the hotspot-compiler-dev
mailing list