RFR: 8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT [v2]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Thu Sep 11 07:45:20 UTC 2025
On Wed, 10 Sep 2025 18:39:06 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.
>
> Cesar Soares Lucas has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert clean-up in EA. Make catch statements more specific in test case.
Changes requested by rcastanedalo (Reviewer).
test/hotspot/jtreg/compiler/escapeAnalysis/TestReduceAllocationNotReducibleAnymore.java line 38:
> 36:
> 37: public class TestReduceAllocationNotReducibleAnymore {
> 38: public static void main(String[] args) {
Suggestion:
public static void main (String[] args) {
test/hotspot/jtreg/compiler/escapeAnalysis/TestReduceAllocationNotReducibleAnymore.java line 39:
> 37: public class TestReduceAllocationNotReducibleAnymore {
> 38: public static void main(String[] args) {
> 39: for (int i =0; i< 100; i++) {
Suggestion:
for (int i = 0; i < 100; i++) {
-------------
PR Review: https://git.openjdk.org/jdk/pull/27063#pullrequestreview-3209508720
PR Review Comment: https://git.openjdk.org/jdk/pull/27063#discussion_r2339170016
PR Review Comment: https://git.openjdk.org/jdk/pull/27063#discussion_r2339171222
More information about the hotspot-compiler-dev
mailing list