mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7174510: 19 JCK compiler tests fail with C2 error: memNode.cpp:812 - ShouldNotReachHere
Add missing check for EncodeP node in MemNode::Ideal_common_DU_postCCP() method. Reviewed-by: twisti
This commit is contained in:
parent
a23aa66098
commit
ae6d0d30f5
1 changed files with 16 additions and 0 deletions
|
@ -717,6 +717,22 @@ Node *MemNode::Ideal_common_DU_postCCP( PhaseCCP *ccp, Node* n, Node* adr ) {
|
||||||
adr = adr->in(1);
|
adr = adr->in(1);
|
||||||
continue;
|
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:
|
case Op_CastPP:
|
||||||
// If the CastPP is useless, just peek on through it.
|
// If the CastPP is useless, just peek on through it.
|
||||||
if( ccp->type(adr) == ccp->type(adr->in(1)) ) {
|
if( ccp->type(adr) == ccp->type(adr->in(1)) ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue