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]
Christian Hagedorn
chagedorn at openjdk.org
Thu Dec 1 14:44:04 UTC 2022
On Thu, 1 Dec 2022 13:04:14 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move test to ccp
>
> 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).
> test/hotspot/jtreg/compiler/c2/TestCastIIWrongTypeCCP.java line 1:
>
>> 1: /*
>
> This file might fit better under `test/hotspot/jtreg/compiler/ccp`.
That's a good point, I'll move it over there.
-------------
PR: https://git.openjdk.org/jdk/pull/11448
More information about the hotspot-compiler-dev
mailing list