On Mon, 1 Jun 2026 08:26:56 GMT, Manuel Hässig <[email protected]> wrote:

>> Vladimir Ivanov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   updates
>
> src/hotspot/share/opto/library_call.cpp line 2486:
> 
>> 2484:     } else if (type == T_BOOLEAN) {
>> 2485:       if (mismatched || alias_type->index() == Compile::AliasIdxRaw) {
>> 2486:         value_type = TypeInt::UBYTE;
> 
> Why is this needed for mismatched or off heap accesses?

When it comes to on-heap accesses, booleans are unconditionally normalized on 
stores and there's no need to normalize them on loads. But in case of unsafe 
access when the access is mismatched or the location type is not known, we 
either know there was no normalization performed on store (e.g., byte loaded as 
boolean) or can't say for sure (because memory location info is not available). 
So, in such scenarios, normalization is conservatively performed on loads. 
Off-heap memory is considered untyped, so booleans are normalized both on 
stores and loads.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31249#discussion_r3336417087

Reply via email to