RFR: 8360654: AArch64: Remove redundant dmb from C1 compareAndSet [v5]

Ruben duke at openjdk.org
Thu Nov 20 14:21:13 UTC 2025


On Wed, 19 Nov 2025 19:37:53 GMT, Andrew Haley <aph at openjdk.org> wrote:

> It would be best to concentrate on eliminating trailing DMB from C1

Sure, I will consider the C2 to be outside the scope.

Similarly, there are references for `atomic_addal` and `atomic_addalw` in the C2. I initially expected these to be used in codegen for the above test, however it doesn't happen - apparently because the function isn't an intrinsic candidate.
https://github.com/openjdk/jdk/blob/f125c76f5b53d90a09f58c22d6def7d843feaa50/src/java.base/share/classes/jdk/internal/misc/Unsafe.java#L2503-L2511

> because there are a few cases that should be handled.

I haven't yet looked in details into other cases in C1 - presumably, an optimization similar to https://github.com/openjdk/jdk/pull/26748 should be possible for stores; this would need further investigation.

However, is there anything else that should be handled within this pull request?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26000#discussion_r2546241545


More information about the hotspot-compiler-dev mailing list