< prev index next >

src/hotspot/share/opto/loopopts.cpp

Print this page

        

@@ -1013,15 +1013,10 @@
     if (n->is_Phi()) {
       for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
         Node* m = n->fast_out(j);
         if (m->is_FastLock())
           return false;
-        if (m->is_ValueType()) {
-          // TODO this breaks optimizations!
-          // Value types should not be split through phis
-          //return false;
-        }
 #ifdef _LP64
         if (m->Opcode() == Op_ConvI2L)
           return false;
         if (m->is_CastII() && m->isa_CastII()->has_range_check()) {
           return false;

@@ -1370,10 +1365,11 @@
   try_move_store_after_loop(n);
 
   // Remove multiple allocations of the same value type
   if (n->is_ValueType() && EliminateAllocations) {
     n->as_ValueType()->remove_redundant_allocations(&_igvn, this);
+    return; // n is now dead
   }
 
   // Check for Opaque2's who's loop has disappeared - who's input is in the
   // same loop nest as their output.  Remove 'em, they are no longer useful.
   if( n_op == Op_Opaque2 &&
< prev index next >