--- old/src/hotspot/share/opto/split_if.cpp 2019-03-11 14:26:57.778354441 +0100 +++ new/src/hotspot/share/opto/split_if.cpp 2019-03-11 14:26:57.530354445 +0100 @@ -27,6 +27,7 @@ #include "opto/callnode.hpp" #include "opto/loopnode.hpp" #include "opto/movenode.hpp" +#include "opto/valuetypenode.hpp" //------------------------------split_thru_region------------------------------ @@ -231,6 +232,15 @@ rtype = TypeLong::INT; } + // Value types should not be split through Phis but each value input + // needs to be merged individually. At this point, value types should + // only be used by AllocateNodes. Try to remove redundant allocations + // and unlink the now dead value type node. + if (n->is_ValueType()) { + n->as_ValueType()->remove_redundant_allocations(&_igvn, this); + return true; // n is now dead + } + // Now actually split-up this guy. One copy per control path merging. Node *phi = PhiNode::make_blank(blk1, n); for( uint j = 1; j < blk1->req(); j++ ) {