--- old/src/share/vm/opto/cfgnode.cpp 2016-03-11 15:59:08.243145558 +0100 +++ new/src/share/vm/opto/cfgnode.cpp 2016-03-11 15:59:08.147145555 +0100 @@ -1207,13 +1207,12 @@ #endif while (un != NULL && un->req() == 2 && un->is_ConstraintCast()) { Node* next = un->in(1); - if (phase->type(next)->isa_rawptr() && phase->type(un)->isa_oopptr()) { - // risk exposing raw ptr at safepoint + // Make sure we don't lose type information + if (!phase->type(next)->higher_equal(phase->type(un))) { break; } un = next; } - assert(m == un || un->in(1) == m, "Only expected at CheckCastPP from allocation"); } if (un == NULL || un == this || phase->type(un) == Type::TOP) { continue; // ignore if top, or in(i) and "this" are in a data cycle