On Wed, 4 Feb 2026 13:07:17 GMT, Tobias Hartmann <[email protected]> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   comments
>
> src/hotspot/share/opto/parse1.cpp line 667:
> 
>> 665:       improved_type = improved_type->join_speculative(t)->is_ptr();
>> 666:       if (improved_type != t) {
>> 667:         Node* cast = _gvn.transform(new CheckCastPPNode(control(), 
>> parm, improved_type, 
>> ConstraintCastNode::DependencyType::NonFloatingNarrowing));
> 
> Can't we use default `FloatingNarrowing` here?

Thanks for your speedy review. Theoretically, it makes more sense since this 
speculation comes with the method invocation, and a method invocation does not 
float. Practically, it does not make any difference because this speculation 
should only be practiced when we are the top-most method. In that case, there 
is no where else to hoist to so it makes no difference whether the cast is 
floating. I have added a comment explaining why this speculation only makes 
sense when we are the top-most method.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2030#discussion_r2764075205

Reply via email to