RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v24]

Vladimir Ivanov vlivanov at openjdk.org
Thu Nov 13 03:05:14 UTC 2025


On Tue, 11 Nov 2025 12:04:54 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> You have a few tests already, but I'd love to see some IR tests. You could even check for the presence of ReachabilityFenceNode during some phase and then see if it goes away. Nice would be if we could even track if a SafePoint has a RF edge attached, but not sure how easy that is.
> It would allow us not only to check for correctness, and hoping that we would catch incorrect cases with a crash/wrong result. But it would allow us to verify the graph, including the optimizations.

The main complications with IR tests I see are:
  (1) very few cases where RF node is missing are known and all of them have already have a dedicated regression test;
  (2) the invariants RF imposes on the graph are non-local and it's hard to check them by inspecting IR.

There's the transformation for loop-invariant referent I could try to add an IR unit test for, but I don't know how suitable IR test framework is for such scenario.

Overall, I'd prefer to leave it as is for now and explore opportunities for IR tests as part of general effort to improve RF test coverage.

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

PR Comment: https://git.openjdk.org/jdk/pull/25315#issuecomment-3524974064


More information about the hotspot-compiler-dev mailing list