RFR: 8280469: C2: CHA support for interface calls when inlining through method handle linker [v2]

Vladimir Ivanov vlivanov at openjdk.org
Tue Nov 4 19:39:18 UTC 2025


On Tue, 4 Nov 2025 18:26:52 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/cha/StrengthReduceInterfaceCall.java line 75:
>> 
>>> 73: 
>>> 74:         // Implementation limitation: CHA is not performed by C1 during inlining through MH linkers.
>>> 75:         if (!jdk.test.whitebox.code.Compiler.isC1Enabled()) {
>> 
>> Should you check that C2 is **enabled**?
>
> May it should be in @requires ?

> Should you check that C2 is enabled?

The test has `@requires !vm.graal.enabled`. Do you prefer to have it spelled as `@requires vm.compiler2.enabled` instead?

> May it should be in @requires?

Original test cases apply to both C1 and C2. I could introduce a separate test for MH invoker cases, but IMO keeping relevant test logic co-located is preferred compared to avoiding a configuration check at runtime.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28094#discussion_r2491830184


More information about the hotspot-compiler-dev mailing list