--- old/src/share/vm/opto/cfgnode.cpp 2016-01-22 15:00:08.476049106 +0100 +++ new/src/share/vm/opto/cfgnode.cpp 2016-01-22 15:00:08.190564782 +0100 @@ -1062,6 +1062,15 @@ } #endif //ASSERT + if (l && ((const Node*)l->phi() == this) && + phase->type(l->in(LoopNode::LoopBackControl)) == Type::TOP) { + // During CCP, if we saturate the type of a counted loop's Phi + // before the special code for counted loop above has a chance to + // run (that is as long as the type of the backedge's control is + // top), we might end up with non monotonic types + return ft; + } + // Deal with conversion problems found in data loops. ft = phase->saturate(ft, phase->type_or_null(this), _type);