RFR: 8350563: C2 compilation fails because PhaseCCP does not reach a fixpoint [v4]
Christian Hagedorn
chagedorn at openjdk.org
Wed Mar 19 16:05:09 UTC 2025
On Wed, 12 Mar 2025 16:08:14 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:
>
> Review comments
Some small comments, otherwise, it looks good to me.
test/hotspot/jtreg/compiler/ccp/TestAndConZeroCCP.java line 31:
> 29: * @run driver compiler.c2.TestAndConZeroCCP
> 30: */
> 31: package compiler.c2;
You should update this to `ccp` now that you moved the test and use `main` instead of `driver`. Otherwise, `@run driver` is never executed with additionally passed in flags, for example in higher tier.
Suggestion:
* @run main/othervm -Xbatch -XX:-TieredCompilation compiler.ccp.TestAndConZeroCCP
* @run driver compiler.ccp.TestAndConZeroCCP
*/
package compiler.ccp;
test/hotspot/jtreg/compiler/ccp/TestAndConZeroCCP.java line 37:
> 35: public class TestAndConZeroCCP {
> 36:
> 37: public static void main(String[] args) {
You should use a 4 space indentation for Java tests.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23871#pullrequestreview-2699111257
PR Review Comment: https://git.openjdk.org/jdk/pull/23871#discussion_r2003703218
PR Review Comment: https://git.openjdk.org/jdk/pull/23871#discussion_r2003708656
More information about the hotspot-compiler-dev
mailing list