RFR: 8371536: C2: VerifyIterativeGVN should assert on first detected failure [v12]
Benoît Maillard
bmaillard at openjdk.org
Thu Jan 29 13:39:11 UTC 2026
On Thu, 29 Jan 2026 11:58:17 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Change condition structure
>
> src/hotspot/share/opto/phaseX.hpp line 265:
>
>> 263: }
>> 264: NOT_PRODUCT(~PhaseValues();)
>> 265: PhaseIterGVN* is_IterGVN() { return (_phase >= PhaseValuesType::iter_gvn) ? (PhaseIterGVN*)this : nullptr; }
>
> Suggestion:
>
> PhaseIterGVN* is_IterGVN() { return (_phase == PhaseValuesType::iter_gvn || _phase == PhaseValuesType::ccp) ? static_cast<PhaseIterGVN*>(this) : nullptr; }
>
> I find relying on the enum order quite error prone. Also, we should probably prefer a static cast.
We actually can't do the static cast here, as the target type is incomplete (we are in the headers file). I moved it to `.cpp`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28295#discussion_r2741671007
More information about the hotspot-compiler-dev
mailing list