From de702b3a1f3f7c1179023a9f340e4f2a5a9f3bce Mon Sep 17 00:00:00 2001 From: kvn Date: Mon, 31 Mar 2008 18:37:36 -0700 Subject: [PATCH] 6682236: C2 hits ideal nodes limit during IGVN optimization with EA Summary: missing check in LoadNode::Ideal() causes infinite generation of a value Phi. Reviewed-by: jrose, never --- src/share/vm/opto/memnode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp index d3027cec7..df47ccb0e 100644 --- a/src/share/vm/opto/memnode.cpp +++ b/src/share/vm/opto/memnode.cpp @@ -1122,6 +1122,12 @@ Node *LoadNode::Ideal(PhaseGVN *phase, bool can_reshape) { } // Split through Phi (see original code in loopopts.cpp). assert(phase->C->have_alias_type(addr_t), "instance should have alias type"); + + // Do nothing here if Identity will find a value + // (to avoid infinite chain of value phis generation). + if ( !phase->eqv(this, this->Identity(phase)) ) + return NULL; + const Type* this_type = this->bottom_type(); int this_index = phase->C->get_alias_index(addr_t); int this_offset = addr_t->offset(); -- GitLab