# HG changeset patch # User rbackman # Date 1382450535 0 # Node ID 36e17466dd39c2cc05332a23b8703844c1f04a66 # Parent 5ccbab1c69f3c3dbe1fac87258e4bbd725d2ba15# Parent 435c7b4577cd2f2db3111f063423739fa0c62edc Merge diff -r 5ccbab1c69f3 -r 36e17466dd39 src/share/vm/opto/compile.cpp --- a/src/share/vm/opto/compile.cpp Tue Oct 22 09:51:47 2013 +0200 +++ b/src/share/vm/opto/compile.cpp Tue Oct 22 14:02:15 2013 +0000 @@ -3006,10 +3006,15 @@ if (result != NULL) { for (DUIterator_Fast jmax, j = result->fast_outs(jmax); j < jmax; j++) { Node* out = result->fast_out(j); - if (out->in(0) == NULL) { - out->set_req(0, non_throwing); - } else if (out->in(0) == ctrl) { - out->set_req(0, non_throwing); + // Phi nodes shouldn't be moved. They would only match below if they + // had the same control as the MathExactNode. The only time that + // would happen is if the Phi is also an input to the MathExact + if (!out->is_Phi()) { + if (out->in(0) == NULL) { + out->set_req(0, non_throwing); + } else if (out->in(0) == ctrl) { + out->set_req(0, non_throwing); + } } } }