[lworld] RFR: 8376791: [lworld] C2 compilation hits assert(!not_flat || !is_flat()) failed: inconsistency [v4]
Quan Anh Mai
qamai at openjdk.org
Wed Feb 4 13:42:25 UTC 2026
On Wed, 4 Feb 2026 13:07:17 GMT, Tobias Hartmann <thartmann at openjdk.org> 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
More information about the valhalla-dev
mailing list