8192762: LoopNode::verify_strip_mined() fails with "assert failed: only phis"
authorroland
Fri, 01 Dec 2017 16:20:18 -0800
changeset 48193 e98710c4f6c1
parent 48192 e5e07e9361ec
child 48194 09b7b32b244f
8192762: LoopNode::verify_strip_mined() fails with "assert failed: only phis" Summary: don't clone Phi to uncommon calls Reviewed-by: kvn
src/hotspot/share/opto/compile.cpp
--- a/src/hotspot/share/opto/compile.cpp	Fri Dec 01 15:58:39 2017 -0800
+++ b/src/hotspot/share/opto/compile.cpp	Fri Dec 01 16:20:18 2017 -0800
@@ -2751,27 +2751,28 @@
   case Op_CallRuntime:
   case Op_CallLeaf:
   case Op_CallLeafNoFP: {
-    assert( n->is_Call(), "" );
+    assert (n->is_Call(), "");
     CallNode *call = n->as_Call();
     // Count call sites where the FP mode bit would have to be flipped.
     // Do not count uncommon runtime calls:
     // uncommon_trap, _complete_monitor_locking, _complete_monitor_unlocking,
     // _new_Java, _new_typeArray, _new_objArray, _rethrow_Java, ...
-    if( !call->is_CallStaticJava() || !call->as_CallStaticJava()->_name ) {
+    if (!call->is_CallStaticJava() || !call->as_CallStaticJava()->_name) {
       frc.inc_call_count();   // Count the call site
     } else {                  // See if uncommon argument is shared
       Node *n = call->in(TypeFunc::Parms);
       int nop = n->Opcode();
       // Clone shared simple arguments to uncommon calls, item (1).
-      if( n->outcnt() > 1 &&
+      if (n->outcnt() > 1 &&
           !n->is_Proj() &&
           nop != Op_CreateEx &&
           nop != Op_CheckCastPP &&
           nop != Op_DecodeN &&
           nop != Op_DecodeNKlass &&
-          !n->is_Mem() ) {
+          !n->is_Mem() &&
+          !n->is_Phi()) {
         Node *x = n->clone();
-        call->set_req( TypeFunc::Parms, x );
+        call->set_req(TypeFunc::Parms, x);
       }
     }
     break;