# HG changeset patch # User kvn # Date 1253910362 25200 # Node ID bcfd1e08dcea6e4a08b835a6da5fe6ec528ab744 # Parent e049e6b81e1126666802c4ff3ffd05f6ecb52bab 6883468: C2 compiler enters infinite loop in PhaseIterGVN::transform Summary: Avoid ideal transformation ping-pong between AddPNode::Ideal() and CastX2PNode::Ideal(). Reviewed-by: cfang diff -r e049e6b81e11 -r bcfd1e08dcea hotspot/src/share/vm/opto/connode.cpp --- a/hotspot/src/share/vm/opto/connode.cpp Wed Sep 23 23:57:44 2009 -0700 +++ b/hotspot/src/share/vm/opto/connode.cpp Fri Sep 25 13:26:02 2009 -0700 @@ -1085,6 +1085,9 @@ switch (op) { case Op_SubX: x = in(1)->in(1); + // Avoid ideal transformations ping-pong between this and AddP for raw pointers. + if (phase->find_intptr_t_con(x, -1) == 0) + break; y = in(1)->in(2); if (fits_in_int(phase->type(y), true)) { return addP_of_X2P(phase, x, y, true);