[9] RFR(S): 8158228: C1 incorrectly folds mismatched loads from stable arrays
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Thu Jun 2 13:49:26 UTC 2016
>> Mismatch detection is more complex than just comparing basic types (see Type::make_constant_from_array_element() & check_mismatched_access(), though some checks are C2-specific).
>
> Right, I agree. I would like to go with marking LoadIndexed/StoreIndexed as mismatched when emitting the intrinsic:
> http://cr.openjdk.java.net/~thartmann/8158228/webrev.01/
>
> Like this we still have optimal code. What do you think?
I suggest to completely disable constant folding in
Canonicalizer::do_LoadIndexed if LoadIndexed node is marked as mismatched.
Please, leave ciArray::element_value_impl as is.
Otherwise, looks good.
Best regards,
Vladimir Ivanov
More information about the hotspot-compiler-dev
mailing list