RFR: 8346836: C2: Introduce a way to verify the correctness of ConstraintCastNodes at runtime [v7]

Quan Anh Mai qamai at openjdk.org
Tue Apr 8 20:15:51 UTC 2025


On Tue, 8 Apr 2025 00:44:05 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 867:
>> 
>>> 865: 
>>> 866: static void abort_checked_cast_long(jlong val, jlong lo, jlong hi) {
>>> 867:   fatal("Invalid CastLL, val: %lld, lo: %lld, hi: %lld", (long long)val, (long long)lo, (long long)hi);
>> 
>> There's `JLONG_FORMAT` to pretty-print jlongs.
>
> FTR it would be nice to include CastII/CastLL node ID to assist diagnosing the bug, but, unfortunately, there's no easy way to capture such information during matching.

Added printing the `MachNode`'s idx.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22880#discussion_r2033948356


More information about the hotspot-compiler-dev mailing list