Integrated: 8372154: AArch64: Match rule failure with some CompareAndSwap operand shapes
Aleksey Shipilev
shade at openjdk.org
Fri Nov 21 09:42:37 UTC 2025
On Wed, 19 Nov 2025 17:41:48 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> See bug for more details.
>
> Following up on [JDK-8371959](https://bugs.openjdk.org/browse/JDK-8371959) failures, I managed to reproduce the "bad AD" file assert. It is heavily intermittent, and needs hours of runs before we hit the lucky seed, plus [JDK-8360557](https://bugs.openjdk.org/browse/JDK-8360557) to have broader testing scope.
>
> It looks like `CastII` node accepts the wider operand type (`iRegI`), which fails to match against narrower type in CAS match rules (`iRegINoSp`). It makes sense to use `iRegINoSp` for destination regs, so that we do not start writing to these special registers. But for operand registers, it makes little sense, IMO. I note that cas.m4-generated CAE/WCAS stubs actually already have the wider `iRegI` for operand types.
>
> So it looks to me the manual CAS match rules should also use `iRegI`. It would be even better to auto-generate these match rules from M4 stencils, and I tried that, but ultimately decided it obscures the actual bug fix. [JDK-8372188](https://bugs.openjdk.org/browse/JDK-8372188) is dedicated to moving the match rules, hopefully without the semantic change.
>
> In this change, I dropped `*NoSp` from CAS operand match rules. It fixes the `iRegI` mismatch, and prepares us for harmonizing these rules with the rest of CAS/CAE generated ones.
>
> Additional testing:
> - [x] Linux AArch64 server fastdebug, local `bad AD` assert reproducer no longer fails
> - [x] Linux AArch64 server fastdebug, `all`
> - [x] Linux AArch64 server fastdebug, jcstress run
This pull request has now been integrated.
Changeset: 88ec4e61
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/88ec4e615a3008408184b7ed92010adc75d63853
Stats: 15 lines in 1 file changed: 0 ins; 0 del; 15 mod
8372154: AArch64: Match rule failure with some CompareAndSwap operand shapes
Reviewed-by: aph, adinn
-------------
PR: https://git.openjdk.org/jdk/pull/28398
More information about the hotspot-compiler-dev
mailing list