RFR: 8267807: C2: Downcast receiver to target holder during inlining
Vladimir Ivanov
vlivanov at openjdk.java.net
Tue Jun 1 10:31:21 UTC 2021
On Tue, 1 Jun 2021 07:01:19 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> What about adding a simple test for this? Maybe by using the new IR testing framework once it's there.
Existing tests (and new CHA tests under reviews) trigger the assert in `Parse::do_field_access()` when the cast is absent:
const TypeInstPtr *tjp = TypeInstPtr::make(TypePtr::NotNull, iter().get_declared_field_holder());
assert(_gvn.type(obj)->higher_equal(tjp), "cast_up is no longer needed");
Once IR testing framework is integrated, it may be worth the effort to prepare a stand-alone simple test case.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4212
More information about the hotspot-compiler-dev
mailing list