RFR: 8350563: C2 compilation fails because PhaseCCP does not reach a fixpoint
Liam Miller-Cushon
cushon at openjdk.org
Wed Mar 5 15:46:02 UTC 2025
On Mon, 3 Mar 2025 18:45:52 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
> Hello, please consider this fix for [JDK-8350563](https://bugs.openjdk.org/browse/JDK-8350563) contributed by my colleague Matthias Ernst.
>
> https://github.com/openjdk/jdk/pull/22856 introduced a new `Value()` optimization for the pattern `AndIL(Con, Mask)`.
> This optimization can look through CastNodes, and therefore requires additional logic in CCP to push these
> transitive uses to the worklist.
>
> The optimization is closely related to analogous optimizations for SHIFT nodes, and we also extend the existing logic for
> CCP worklist handling: the current logic is "if the shift input to a SHIFT node changes, push indirect AND node uses to the CCP worklist".
> We extend it by adding "if the (new) type of a node is an IntegerType that `is_con, ...` to the predicate.
Thanks for taking a look!
> Can you please add a description to the PR (and if possible also on JIRA) to explain what the issue is, and how you are fixing it?
Done
> Is there a regression test that reproduces this reliably?
Matthias reports:
Re: regtest: I don't currently have a standalone regtest, I am using java/lang/Character/CheckProp.java from the issue report to reproduce the failure and verify the fix. I can try and extract the failure condition into a standalone test.
Does the fix look reasonable?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23871#issuecomment-2701332152
More information about the hotspot-compiler-dev
mailing list