RFR(XS): 8026959: assert(!n->pinned() || n->is_MachConstantBase()) failed: only pinned MachConstantBase node is expected here

Rickard Bäckman rickard.backman at oracle.com
Mon Oct 21 06:39:33 PDT 2013


Hi,

can I have reviews for this small change?
The problem is we are moving a Phi node that is both input and output to
a MathExactNode.

Unfortunately cr.openjdk.java.net is down at the moment. I'm pasting the
diff below.

diff --git a/src/share/vm/opto/compile.cpp b/src/share/vm/opto/compile.cpp
--- a/src/share/vm/opto/compile.cpp
+++ b/src/share/vm/opto/compile.cpp
@@ -3004,6 +3004,10 @@
       if (result != NULL) {
         for (DUIterator_Fast jmax, j = result->fast_outs(jmax); j < jmax; j++) {
           Node* out = result->fast_out(j);
+          // 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) {
@@ -3012,6 +3016,7 @@
         }
       }
     }
+    }
     break;
   default:
     assert( !n->is_Call(), "" );


Thank you
/R


More information about the hotspot-compiler-dev mailing list