[15] RFR: 8237894: CTW: C1 compilation fails with assert(x->type()->tag() == f->type()->tag()) failed: should have same type

Jamsheed C M jamsheed.c.m at oracle.com
Mon Feb 17 13:48:24 UTC 2020


Hi Tobias,

On 17/02/2020 18:34, Tobias Hartmann wrote:
> On 17.02.20 13:34, Jamsheed C M wrote:
>> i meant for null object field access or indexed access, the instruction can match across subtypes*
>> and get eliminated. which can still put us in awkward situation if we try checking exact/declared
>> types, which we normally don't do.
>>
>> *(as instruction types are erased types)
> Right but it's not a problem with current code.

i am guessing it, but i am not very sure from runtime side, if it has 
asserts checking recv type and declared type of current instruction (i.e 
resolve_invoke)

>>>>> And given that, does your solution actually work with Object arrays?
>>>> Yes, as we are asserting on elem instruction type for indexed access.
>>> But isn't it the case that with your change, a null from an MyObject1[] load still has the same hash
>>> as a null from a MyObject2[] load because type()->tag() is the same? And wouldn't that still trigger
>>> the assert?
>> it wouldn't, instruction types are erased types. so sub types all would match
> Okay, I see. Thanks for the explanation.
>
> Webrev.01 seems reasonable to me but I think it would be good if someone with more C1 expertise
> could take a look as well.

sure.

Best regards,

Jamsheed

>
> Thanks,
> Tobias


More information about the hotspot-compiler-dev mailing list