RFR(S): 8158228: C1 incorrectly folds mismatched loads from stable arrays
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:
> 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.
More information about the hotspot-compiler-dev