RFR: 8372634: C2: Materialize type information from instanceof checks [v4]

Vladimir Ivanov vlivanov at openjdk.org
Sat Dec 6 01:47:56 UTC 2025


On Fri, 5 Dec 2025 17:22:19 GMT, ExE Boss <duke at openjdk.org> wrote:

>> The test is intended as a white-box test. It focuses on bytecode shapes which result in different IR representations and exercise different optimizations. From compiler perspective, there's no difference between  `if (defaultInlineInstanceOfCond(a)) { ... }` and `if (a instanceof B) {...}` when inlining happens during parsing. Both test cases produce the very same IR after parsing is over.
>
> It might be useful to have these tests in case the default inlining IR changes in the future.

It's intended as a unit test. It's better to catch inlining issue with targeted tests on inlining. From compiler perspective, there's no reason to cover other cases here. There are so many different scenarios how a subtype check can show up in IR. And different scenarios can theoretically fail due to different reasons.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28517#discussion_r2594354870


More information about the hotspot-compiler-dev mailing list