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

Quan Anh Mai qamai at openjdk.org
Sun Jan 19 15:14:42 UTC 2025


On Fri, 17 Jan 2025 07:48:49 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Hi,
>> 
>> This patch adds a develop flag `VerifyConstraintCasts`, which will verify the correctness of `CastIINode`s and `CastLLNode`s at runtime and crash the VM if the dynamic value lies outside the type value range.
>> 
>> Please take a look, thanks a lot.
>
> What about implementing the same for aarch64? That would increase our coverage eventually.

@eme64 Thanks for your reviews, I have added 2 test cases for `TestIterativeGVN` that set `VerifyConstraintCasts`, the name of the test may need to change but I have not been able to come up with anything preferable.

For aarch64, I don't have an aarch64 machine around so it would be not so trivial.

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

PR Comment: https://git.openjdk.org/jdk/pull/22880#issuecomment-2600901548


More information about the hotspot-compiler-dev mailing list