RFR: 8334647: C2: CastII added by PhaseIdealLoop::add_template_assertion_predicate() should have control
Roland Westrelin
roland at openjdk.org
Fri Jun 21 13:37:09 UTC 2024
On Fri, 21 Jun 2024 08:49:29 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> IIUC, the rational behind it is that when a `CastII` becomes top, then some control path must also be folded to not end up with a broken graph. And the control path to be folded should be the one on which the `CastII` is control dependent on with a control input?
Right.
> Are there other places where a `CastII` is currently without control input? If so, should we fix those as well?
I found this one with manual inspection:
https://github.com/rwestrel/jdk/blob/b05cf955d68034ba014cc63486797876d492ca5f/src/hotspot/share/opto/loopTransform.cpp#L3007
And, yes I think it should have a control because if it's narrowing its input type, then it has to be dependent on some condition.
There are also 2 in `LibraryCallKit::inline_vector_insert()` but I'm not sure what to do with these ones.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19808#issuecomment-2182767978
More information about the hotspot-compiler-dev
mailing list