--- old/src/hotspot/share/opto/phaseX.cpp 2017-10-20 09:01:10.715702753 +0200 +++ new/src/hotspot/share/opto/phaseX.cpp 2017-10-20 09:01:10.539702756 +0200 @@ -1760,6 +1760,17 @@ worklist.push(phi); } } + // Loading the java mirror from a klass oop requires two loads and the type + // of the mirror load depends on the type of 'n'. See LoadNode::Value(). + if (m_op == Op_LoadP && m->bottom_type()->isa_rawptr()) { + for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) { + Node* u = m->fast_out(i2); + const Type* ut = u->bottom_type(); + if (u->Opcode() == Op_LoadP && ut->isa_instptr() && ut != type(u)) { + worklist.push(u); + } + } + } } } }