Integrated: 8372862: AArch64: Fix GetAndSet-acquire costs after JDK-8372188
Aleksey Shipilev
shade at openjdk.org
Wed Dec 3 10:58:01 UTC 2025
On Tue, 2 Dec 2025 10:44:24 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> I just noticed (while looking at [JDK-8372800](https://bugs.openjdk.org/browse/JDK-8372800)) that I made a little error in [JDK-8372188](https://bugs.openjdk.org/browse/JDK-8372188) refactor, which made GetAndSet-acquire instruction cost twice as high. The usual cost for acquire versions are twice as low, likely to be selected instead of non-acquire versions.
>
> This bug happened as I "simplified" stencils at some point by dropping some arguments and renumbering the remaining ones. This is one place where I apparently forgot to renumber one usage. See other checks for `ifelse($3,Acq,...` in that stencil, all of them are `$3` (correct), not `$4` (incorrect). Seen no real bugs because of this mishap, but it would be good to fix it in case we see issues later. I also looked at stencils again, and I think there are no other argument-index problems like this anywhere else.
>
> The real change is in `aarch64_atomic_ad.m4`, `.ad` is re-generated from that stencil.
>
> Additional testing:
> - [x] Linux AArch64 server fastdebug, `all`
> - [x] Linux AArch64 server fastdebug, quick jcstress run
This pull request has now been integrated.
Changeset: 3f447edf
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3f447edf0e22431628ebb74212f760209ea29d37
Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod
8372862: AArch64: Fix GetAndSet-acquire costs after JDK-8372188
Reviewed-by: dlong, mhaessig
-------------
PR: https://git.openjdk.org/jdk/pull/28598
More information about the hotspot-compiler-dev
mailing list