RFR: 8328702: C2: Crash during parsing because sub type check is not folded
Roland Westrelin
roland at openjdk.org
Wed Mar 27 16:08:26 UTC 2024
On Wed, 27 Mar 2024 15:27:13 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> src/hotspot/share/opto/type.cpp line 6465:
>>
>>> 6463: }
>>> 6464: if (this_one->is_instance_type(other)) {
>>> 6465: return other->klass()->equals(ciEnv::current()->Object_klass()) && other->_interfaces->intersection_with(this_one->_interfaces)->eq(other->_interfaces);
>>
>> `TypeInterfaces` has a `contains` method that does `intersection_with` + `eq`. Could we use it here? i.e. `this_one->_interfaces->contains(other->_interfaces)`
>
> That would definitely be better but I've seen that there are three other uses of `intersection_with` + `eq`. We should probably update them all together but not sure if I should squeeze this in here. Should I follow up with an RFE?
That sounds good to me.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18512#discussion_r1541408422
More information about the hotspot-compiler-dev
mailing list