RFR: 8355574: Fatal error in abort_verify_int_in_range due to Invalid CastII [v4]

Vladimir Ivanov vlivanov at openjdk.org
Thu Nov 13 03:19:04 UTC 2025


On Sat, 24 May 2025 08:43:49 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/hotspot/share/opto/macroArrayCopy.cpp line 209:
>> 
>>> 207:   int inline_limit = ArrayOperationPartialInlineSize / type2aelembytes(type);
>>> 208: 
>>> 209:   const TypeLong* length_type = _igvn.type(length)->isa_long();
>> 
>> Any particular benefit in eagerly pruning the block? It duplicates post-expansion GVN checks of the branch condition. (If it were normal parsing with prompt GVN analysis, you could detect the branch is dead right after `generate_guard` call.) 
>> 
>> Alternatively, the checks are equivalent to checking that join of `length_type` with `[0...inline_limit]` is not empty. But I prefer to let GVN handle it.
>
> I think it is a trivial check and it is much more efficient than creating a bunch of nodes and removing them later.

Ok, then please, turn it into:

const TypeLong* inline_range = TypeLong::make(0, inline_limit);
if (length_type->join(inline_range) == Type::TOP) {
  return;
}

Or even encapsulate the check in `ArrayCopyNode::get_partial_inline_vector_lane_count()` and guard the subsequent checks with `lane_count > 0`.

Otherwise, the patch looks good.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25284#discussion_r2521115265


More information about the hotspot-compiler-dev mailing list