RFR: 8351392: C2 crash: failed: Expected Bool, but got OpaqueMultiversioning

Christian Hagedorn chagedorn at openjdk.org
Fri Mar 7 11:42:53 UTC 2025


On Fri, 7 Mar 2025 11:37:22 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/loopopts.cpp line 794:
>> 
>>> 792:     return nullptr;
>>> 793:   }
>>> 794:   if (bol->is_OpaqueMultiversioning() && bol->as_OpaqueMultiversioning()->is_useless()) {
>> 
>> Isn't any `OpaqueMultiversioning` we find here supposed to be useless? Can we assert that instead?
>
> That is essencially what we I already do. If we find a **useful** node, then we just hit the assert further down.
> 
> But if you want then I can refactor it explicitly.

It might be more explicit with a separate assert that an `OpaqueMultiversioning` should be useless. And we can avoid the `is_useless()` check in product - but of course that should not make much of a difference performance wise :-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23943#discussion_r1984919501


More information about the hotspot-compiler-dev mailing list