< prev index next >

src/hotspot/share/opto/phaseX.cpp

Print this page

        

@@ -1676,10 +1676,18 @@
           }
           _worklist.push(u);
         }
       }
     }
+
+    // TODO: Needed after the block above?
+    if (use->is_ShenandoahBarrier()) {
+      Node* cmp = use->find_out_with(Op_CmpP);
+      if (cmp != NULL) {
+        _worklist.push(cmp);
+      }
+    }
   }
 }
 
 /**
  * Remove the speculative part of all types that we know of

@@ -2104,10 +2112,14 @@
       }
       break;
     default:
       break;
     }
+    if (UseShenandoahGC) {
+      // TODO: Should we call this for ZGC as well?
+      BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn->_worklist, old);
+    }
   }
 
 }
 
 //-------------------------------replace_by-----------------------------------
< prev index next >