On Fri, 26 Jun 2026 10:01:54 GMT, Quan Anh Mai <[email protected]> wrote:
>> Roland Westrelin has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> more
>
> src/hotspot/share/opto/callGenerator.cpp line 77:
>
>> 75: Node* oop = vt->get_oop();
>> 76: if (oop->is_Proj()) {
>> 77: assert(oop->in(0) == call, "projection was replaced by dominating
>> one");
>
> I don't quite understand this part. Why do we check `ret` being a `Proj` of
> `call` in the previous case, but in this case, we assume if it is a `Proj`,
> it must be a `Proj` of call?
The mainstream change assumes `Proj` is from `call`. That caused an issue with
valhalla and I wanted to make sure we would catch such an issue. I took another
look at `ProjNode::Identity()` again and, it seems possible that some
projections for returned value can be replaced by a dominating projection. So
I replaced the assert with an actual check.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2580#discussion_r3480733823