# HG changeset patch # User kvn # Date 1339451931 25200 # Node ID 0919b2e7895d8b43f7531ab1d3981f669b460e15 # Parent 829ee34e7cbd2b272fae8e3c184ce416a755ac52 7174510: 19 JCK compiler tests fail with C2 error: memNode.cpp:812 - ShouldNotReachHere Summary: Add missing check for EncodeP node in MemNode::Ideal_common_DU_postCCP() method. Reviewed-by: twisti diff -r 829ee34e7cbd -r 0919b2e7895d src/share/vm/opto/memnode.cpp --- a/src/share/vm/opto/memnode.cpp Mon Jun 11 08:35:28 2012 -0700 +++ b/src/share/vm/opto/memnode.cpp Mon Jun 11 14:58:51 2012 -0700 @@ -717,6 +717,22 @@ adr = adr->in(1); continue; + case Op_EncodeP: + // EncodeP node's control edge could be set by this method + // when EncodeP node depends on CastPP node. + // + // Use its control edge for memory op because EncodeP may go away + // later when it is folded with following or preceding DecodeN node. + if (adr->in(0) == NULL) { + // Keep looking for cast nodes. + adr = adr->in(1); + continue; + } + ccp->hash_delete(n); + n->set_req(MemNode::Control, adr->in(0)); + ccp->hash_insert(n); + return n; + case Op_CastPP: // If the CastPP is useless, just peek on through it. if( ccp->type(adr) == ccp->type(adr->in(1)) ) {