RFR: 8371536: C2: VerifyIterativeGVN should assert on first detected failure [v6]
Manuel Hässig
mhaessig at openjdk.org
Fri Jan 16 17:41:31 UTC 2026
On Fri, 19 Dec 2025 08:54:08 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:
>> src/hotspot/share/opto/phaseX.cpp line 1202:
>>
>>> 1200: tty->print_cr("%s", ss.as_string());
>>> 1201:
>>> 1202: assert(false, "Missed Value optimization opportunity in PhaseIterGVN for %s", n->Name());
>>
>> What if it gets called during CCP? Then it is not just a missed opportunity, but possibly a correctness problem.
>>
>> I wonder if we should have different assert messages here. We could even just pass a string into the method, either `IGVN` or `CCP`.
>>
>> What do you think?
>
> Good point, I didn't think of that. Passing a string into the method would be one solution. Another one would be to keep the `bool` return type for `verify_Value_for` and assert at the call site (just as it was before). I think this feels a bit more natural that passing an assert message as parameter. What do you think?
Perhaps you could change the message to `... PhaseCCP ...` if --- in Java speak --- `this instanceof PhaseCCP` in addition to the comment you added.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28295#discussion_r2699400064
More information about the hotspot-compiler-dev
mailing list