--- old/src/hotspot/share/opto/compile.cpp 2019-10-08 15:53:41.655651656 +0200 +++ new/src/hotspot/share/opto/compile.cpp 2019-10-08 15:53:41.343651660 +0200 @@ -3433,10 +3433,13 @@ assert( !tp || oop_offset_is_sane(tp), "" ); } #endif - if (EnableValhalla && (nop == Op_LoadKlass || nop == Op_LoadNKlass)) { + if (EnableValhalla && + ((nop == Op_LoadKlass && ((LoadKlassNode*)n)->clear_prop_bits()) || + (nop == Op_LoadNKlass && ((LoadNKlassNode*)n)->clear_prop_bits()))) { const TypeKlassPtr* tk = n->bottom_type()->make_ptr()->is_klassptr(); assert(!tk->klass_is_exact(), "should have been folded"); - if (tk->klass()->can_be_value_array_klass() && n->as_Mem()->adr_type()->offset() == oopDesc::klass_offset_in_bytes()) { + assert(n->as_Mem()->adr_type()->offset() == oopDesc::klass_offset_in_bytes(), "unexpected LoadKlass"); + if (tk->klass()->can_be_value_array_klass()) { // Array load klass needs to filter out property bits (but not // GetNullFreePropertyNode or GetFlattenedPropertyNode which // needs to extract the storage property bits)