# HG changeset patch # User zmajo # Date 1477988354 -3600 # Node ID b23a10ed6a608a5591b6d21aae2f233491a51f62 # Parent e2ed92f56bcf8dbb082c1b942105ffff8d18dc5e 8167578: C1: compiler.escapeAnalysis.TestArrayCopy fails to throw ArrayStoreException Summary: Remove code that causes C1's arraycopy to skip type checks if the length argument is 0 Reviewed-by: kvn diff -r e2ed92f56bcf -r b23a10ed6a60 hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp --- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp Mon Oct 31 17:36:39 2016 +0000 +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp Tue Nov 01 09:19:14 2016 +0100 @@ -2277,14 +2277,6 @@ __ br(Assembler::HI, *stub->entry()); } - // FIXME: The logic in LIRGenerator::arraycopy_helper clears - // length_positive_check if the source of our length operand is an - // arraylength. However, that arraylength might be zero, and the - // stub that we're about to call contains an assertion that count != - // 0 . So we make this check purely in order not to trigger an - // assertion failure. - __ cbzw(length, *stub->continuation()); - if (flags & LIR_OpArrayCopy::type_check) { // We don't know the array types are compatible if (basic_type != T_OBJECT) {