RFR: 8341976: C2: use_mem_state != load->find_exact_control(load->in(0)) assert failure [v2]
Roland Westrelin
roland at openjdk.org
Fri Mar 28 16:04:41 UTC 2025
On Mon, 24 Mar 2025 12:02:31 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>>> Drive by comments: Is `-XX:-UseOnStackReplacement` required to reproduce the issue?
>>
>> No, it's not. I trimmed the list of options for the tests.
>>
>>> There was also a crash when running with `-XX:+TraceLoopOpts`. Can you also add a run with that flag to verify that this patch also fixes that?
>>
>> Added. The `TraceLoopOpts` crash reproduces: the code hits a malformed counted loop. I tweaked the printing code.
>
>> Added. The TraceLoopOpts crash reproduces: the code hits a malformed counted loop. I tweaked the printing code.
>
> Is the malformed counted loop expected or a different issue to look into?
It doesn't look an actual issue to me. `PhiNode::Value` manages to narrow the trip `phi`'s type of the pre loop enough that it's a constant. So the loop no longer has the expected counted loop shape but the loop exit condition that should constant fold doesn't because it's guarded by an `Opaque1` node.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23465#discussion_r2018941323
More information about the hotspot-compiler-dev
mailing list