RFR: 8372862: AArch64: Fix GetAndSet-acquire costs after JDK-8372188
Manuel Hässig
mhaessig at openjdk.org
Wed Dec 3 07:17:56 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
Thank you for fixing this, @shipilev. This looks good to me.
-------------
Marked as reviewed by mhaessig (Committer).
PR Review: https://git.openjdk.org/jdk/pull/28598#pullrequestreview-3533532583
More information about the hotspot-compiler-dev
mailing list