< prev index next >

src/hotspot/share/opto/cfgnode.cpp

Print this page

        

@@ -22,10 +22,11 @@
  *
  */
 
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "gc/shared/c2/barrierSetC2.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "opto/addnode.hpp"
 #include "opto/castnode.hpp"

@@ -1445,11 +1446,14 @@
   } else if( b->_test._test == BoolTest::eq ) {
     flipped = 1-flipped;
   } else return NULL;
 
   // Build int->bool conversion
-  Node *n = new Conv2BNode( cmp->in(1) );
+  Node *in1 = cmp->in(1);
+  BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+  in1 = bs->step_over_gc_barrier(in1);
+  Node *n = new Conv2BNode(in1);
   if( flipped )
     n = new XorINode( phase->transform(n), phase->intcon(1) );
 
   return n;
 }

@@ -1811,11 +1815,16 @@
       if (n != top) {           // Not already top?
         PhaseIterGVN *igvn = phase->is_IterGVN();
         if (can_reshape && igvn != NULL) {
           igvn->_worklist.push(r);
         }
-        set_req(j, top);        // Nuke it down
+        // Nuke it down
+        if (can_reshape) {
+          set_req_X(j, top, igvn);
+        } else {
+          set_req(j, top);
+        }
         progress = this;        // Record progress
       }
     }
   }
 
< prev index next >