On Fri, 7 Aug 2026 07:56:05 GMT, Tobias Hartmann <[email protected]> wrote:
>> I don't think so. The intrinsics starts by doing something like
>>
>> if (arg == null) {
>> if (static) { return 0; }
>> throw NullPointerException();
>> }
>> // Here, arg != null
>> // the rest of the intrinsics ... with cache path, fast path and slow path.
>>
>> Here, we are expanding the slow path (that is the runtime call), so we
>> should already be after the null check. Am I missing something?
>
> But what if we disable the intrinsic or we bail out from intrinsifying for
> another reason? The call could still be optimized and this code would assume
> that the receiver is null checked, which it isn't, right?
It's right and fixed. And tested!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32144#discussion_r3747447518