--- old/src/hotspot/share/opto/subnode.cpp 2017-09-25 13:09:31.474558619 -0400 +++ new/src/hotspot/share/opto/subnode.cpp 2017-09-25 13:09:31.044699393 -0400 @@ -877,8 +877,8 @@ } static inline Node* isa_java_mirror_load(PhaseGVN* phase, Node* n) { - // Return the klass node for - // LoadP(AddP(foo:Klass, #java_mirror)) + // Return the klass node for (indirect load from OopHandle) + // LoadP(LoadP(AddP(foo:Klass, #java_mirror))) // or NULL if not matching. if (n->Opcode() != Op_LoadP) return NULL; @@ -886,6 +886,10 @@ if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL; Node* adr = n->in(MemNode::Address); + // First load from OopHandle + if (adr->Opcode() != Op_LoadP || !phase->type(adr)->isa_rawptr()) return NULL; + adr = adr->in(MemNode::Address); + intptr_t off = 0; Node* k = AddPNode::Ideal_base_and_offset(adr, phase, off); if (k == NULL) return NULL;