RFR: 8371536: C2: VerifyIterativeGVN should assert on first detected failure [v9]

Manuel Hässig mhaessig at openjdk.org
Wed Jan 28 10:11:11 UTC 2026


On Wed, 28 Jan 2026 08:53:21 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:

>> src/hotspot/share/opto/phaseX.cpp line 1206:
>> 
>>> 1204:   } else if (strcmp(phase, "PhaseCCP") == 0) {
>>> 1205:     assert(false, "PhaseCCP not at fixpoint: analysis result may be unsound for %s", n->Name());
>>> 1206:   }
>> 
>> The `strcmp` is a little nasty, but I don't have a better solution right now.
>> But I think we should convert the `else if` condition into an `assert` in the `else` branch.
>> Imagine someone calls the method with a string we don't match here: would we just silently pass?
>
> Right, of course we need to assert in that case as well. Made the change (not sure that's exactly what you meant by "convert the `else if` condition into an `assert` though).

Defining a small, say `GVNVerificationPhase`, enum would already be cleaner, safer and less overhead.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28295#discussion_r2735875499


More information about the hotspot-compiler-dev mailing list