8073792: assert((get_length_if_constant(phase) == -1) == !ary_src->size()->is_con()) failed: inconsistent

Assert in array copy code broken when array size becomes known during igvn

Reviewed-by: kvn, vlivanov
This commit is contained in:
Roland Westrelin 2015-02-25 10:44:38 +01:00
parent f4f9769cd2
commit 3a627c0d83
3 changed files with 54 additions and 4 deletions

View file

@ -121,7 +121,8 @@ int ArrayCopyNode::get_count(PhaseGVN *phase) const {
// length input to ArrayCopyNode is constant, length of input
// array must be too.
assert((get_length_if_constant(phase) == -1) == !ary_src->size()->is_con(), "inconsistent");
assert((get_length_if_constant(phase) == -1) == !ary_src->size()->is_con() ||
phase->is_IterGVN(), "inconsistent");
if (ary_src->size()->is_con()) {
return ary_src->size()->get_con();