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

Ruben duke at openjdk.org
Wed Nov 19 13:35:58 UTC 2025


On Wed, 19 Nov 2025 13:12:59 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 3465:
>> 
>>> 3463: }
>>> 3464: 
>>> 3465: void MacroAssembler::cmpxchg(Register addr, Register expected,
>> 
>> Why do we need all of these non-barrier versions?
>
> Ping? I don't know what this is for. C1 will only add barriers for pre-LSE systems, and nothing else cares. You've got several new methods that no one needs.

Apologies for the delay in response on this.
I'm currently reviewing the call sites of these methods in aarch64.ad - like https://github.com/openjdk/jdk/blob/0bff5f3dbe69ab2a59db771af1020b04c0132954/src/hotspot/cpu/aarch64/aarch64.ad#L8491 via https://github.com/openjdk/jdk/blob/0bff5f3dbe69ab2a59db771af1020b04c0132954/src/hotspot/cpu/aarch64/aarch64.ad#L3358, to understand how barriers are handled in C2.

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

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


More information about the hotspot-compiler-dev mailing list