8257631: C2: Assertion failure in ArrayCopyNode::get_count() during late inlining

Reviewed-by: neliasso, kvn, thartmann
This commit is contained in:
Vladimir Ivanov 2020-12-04 07:55:40 +00:00
parent 417e7e6317
commit f33808ffc9

@ -136,8 +136,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() ||
phase->is_IterGVN() || StressReflectiveCode, "inconsistent");
assert((get_length_if_constant(phase) == -1) != ary_src->size()->is_con() ||
phase->is_IterGVN() || phase->C->inlining_incrementally() || StressReflectiveCode, "inconsistent");
if (ary_src->size()->is_con()) {
return ary_src->size()->get_con();