--- old/src/hotspot/share/opto/cfgnode.cpp 2018-05-25 13:59:49.626919463 +0200 +++ new/src/hotspot/share/opto/cfgnode.cpp 2018-05-25 13:59:49.034919471 +0200 @@ -1663,7 +1663,7 @@ } } - if (type()->isa_valuetypeptr() && can_reshape) { + if (type()->is_valuetypeptr() && can_reshape) { // If the Phi merges the result from a mix of constant and non // constant method handles, only some of its inputs are // ValueTypePtr nodes and we can't push the ValueTypePtr node down @@ -1678,31 +1678,30 @@ // for all values being returned. See // CheckCastPPNode::Ideal(). That ValueTypePtr node can then be // pushed down through Phis. - const TypeValueTypePtr* vtptr = NULL; + const TypeInstPtr* ti = NULL; for (uint i = 1; i < req(); i++) { if (in(i) != NULL && in(i)->is_ValueTypePtr()) { - const TypeValueTypePtr* t = phase->type(in(i))->is_valuetypeptr(); - t = t->cast_to_ptr_type(TypePtr::BotPTR)->is_valuetypeptr(); - if (vtptr == NULL) { - vtptr = t; + const TypeInstPtr* t = phase->type(in(i))->is_instptr(); + t = t->cast_to_ptr_type(TypePtr::BotPTR)->is_instptr(); + if (ti == NULL) { + ti = t; } else { - assert(vtptr == t, "Phi should merge identical value types"); + assert(ti == t, "Phi should merge identical value types"); } } else { - assert(in(i) == NULL || vtptr == NULL || phase->type(in(i))->higher_equal(vtptr) || phase->type(in(i)) == Type::TOP || - phase->type(in(i))->is_valuetypeptr()->is__Value(), "bad type"); + assert(in(i) == NULL || ti == NULL || phase->type(in(i))->higher_equal(ti) || phase->type(in(i)) == Type::TOP, "bad type"); } } - if (vtptr != NULL) { + if (ti != NULL) { // One input is a value type. All inputs must have the same type. bool progress = false; PhaseIterGVN* igvn = phase->is_IterGVN(); for (uint i = 1; i < req(); i++) { - if (in(i) != NULL && !in(i)->is_Con() && !phase->type(in(i))->higher_equal(vtptr)) { + if (in(i) != NULL && !in(i)->is_Con() && !phase->type(in(i))->higher_equal(ti)) { // Can't transform because CheckCastPPNode::Identity can // push the cast up through another Phi and cause this same // transformation to run again, indefinitely - Node* cast = igvn->register_new_node_with_optimizer(new CheckCastPPNode(NULL, in(i), vtptr)); + Node* cast = igvn->register_new_node_with_optimizer(new CheckCastPPNode(NULL, in(i), ti)); set_req(i, cast); progress = true; }