RFR: 8372845: C2: Fold identity hash code if object is constant [v6]
Emanuel Peter
epeter at openjdk.org
Tue Jan 27 07:50:12 UTC 2026
On Tue, 27 Jan 2026 07:12:28 GMT, Chen Liang <liach at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/intrinsics/object/IdentityHashCodeFold.java line 37:
>>
>>> 35: * @summary Verify constant folding is possible for identity hash code
>>> 36: * @library /test/lib /
>>> 37: * @requires vm.compiler2.enabled
>>
>> Drive-by comment:
>> Do you really need this restriction? IR rules are only executed if C2 is available anyway.
>
> Well, the plain test isn't that meaningful without C2. https://github.com/openjdk/jdk/pull/28589#discussion_r2615925589
Right. Vladimir already argued against it. I forgot. I still believe it is best practice not to limit tests unless they are very expensive. But I'll accept the majority vote.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28589#discussion_r2730681732
More information about the hotspot-runtime-dev
mailing list