RFR: 8297264: C2: Cast node is not processed again in CCP and keeps a wrong too narrow type which is later replaced by top [v3]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri Dec 2 08:47:06 UTC 2022


On Thu, 1 Dec 2022 14:36:05 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> src/hotspot/share/opto/phaseX.cpp line 1967:
>> 
>>> 1965:         push_if_not_bottom_type(worklist, cast_ii);
>>> 1966:       }
>>> 1967:     }
>> 
>> Would it make sense to assume there is at most one `CastII` output and replace the loop with a call to the auxiliary function `Node* Node::find_out_with(int opcode)`?
>
> Unfortunately, in this test case, we have 2 `CastII` nodes that need to be re-added. So, I think that `find_out_with()` does not work here in general (even though in this test case, both `CastII` nodes would end up again on the worklist but that is probably not guaranteed in general).

I see, thanks for the explanation!

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

PR: https://git.openjdk.org/jdk/pull/11448


More information about the hotspot-compiler-dev mailing list