RFR: 8350563: C2 compilation fails because PhaseCCP does not reach a fixpoint [v6]

Liam Miller-Cushon cushon at openjdk.org
Thu Mar 20 17:08:09 UTC 2025


On Wed, 19 Mar 2025 16:18:33 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.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/hotspot/jtreg/compiler/ccp/TestAndConZeroCCP.java
>   
>   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>

>From Matthias

Thank you Christian for that reproducer! Unless you've already tried, I think I'll first try and verify whether it's an already present issue at HEAD and this fix is simply incomplete (related to the CCP vs IGVN discussion on https://github.com/openjdk/jdk/pull/22856#issuecomment-2689917878) or whether it's being caused by this fix PR.
I suspect it might be the former, in which case the question would be whether we want to go ahead with this fix for the CCP worklist to reduce noise?

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

PR Comment: https://git.openjdk.org/jdk/pull/23871#issuecomment-2741132640


More information about the hotspot-compiler-dev mailing list