RFR: 8351889: C2 crash: assertion failed: Base pointers must match (addp 344) [v2]

Roland Westrelin roland at openjdk.org
Fri Nov 21 10:24:46 UTC 2025


On Thu, 13 Nov 2025 16:22:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> What if the CastPP above the phi are not yet on the worklist, because their inputs are only later going to change? But that would require CastPP to have different inputs/ctrl in the first place, and that probably cannot happen from unrolling the loop, or other similar operations, such as pre/main/post?

It's hard to see how that would happen. It's also hard to be convinced it can't happen.

> Another thought: if it is so important that we common the just duplicated `CastPP` first, then maybe we really should take care not to duplicate them in the first place. Is that a feasible alternative approach?

The duplication comes from loop body cloning so I'm not sure how we could prevent the duplication. We could try to common the `CastPP` nodes once `PhaseIdealLoop::peeled_dom_test_elim()` is called.

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

PR Comment: https://git.openjdk.org/jdk/pull/25386#issuecomment-3562360158


More information about the hotspot-compiler-dev mailing list