< prev index next >

src/hotspot/share/opto/phaseX.cpp

Print this page

        

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

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