--- old/src/share/vm/opto/loopopts.cpp 2017-06-26 12:50:30.507902937 +0200 +++ new/src/share/vm/opto/loopopts.cpp 2017-06-26 12:50:30.419902941 +0200 @@ -37,6 +37,7 @@ #include "opto/opaquenode.hpp" #include "opto/rootnode.hpp" #include "opto/subnode.hpp" +#include "opto/valuetypenode.hpp" //============================================================================= //------------------------------split_thru_phi--------------------------------- @@ -1359,6 +1360,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); + } + // 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 &&