This is a summary of discussions relative to the merge request created by
Christopher Bazley (chris.bazley) <[email protected]> titled
AArch64: Relax regexps in tests to let them pass with -fweb
since its creation.
Description: The -fweb option changes the way that GCC allocates
registers. -fweb is not enabled by default, so we
have never previously noticed that some AArch64 tests
have unreasonably strict expectations about register
allocation. This patch relaxes those expectations.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/ffs.c: Relax test expectations.
* gcc.target/aarch64/frecpe_1.c: As above.
* gcc.target/aarch64/frecpe_2.c: As above.
The full and up to date discussion can be found at
https://forge.sourceware.org/gcc/gcc/pulls/209
The merge request has been closed without being merged directly on the forge
repository.
On 2026-07-30 16:21:10+00:00, Drea Pinski (pinskia) <[email protected]>
requested changes to the code:
> +++ gcc/testsuite/gcc.target/aarch64/ffs.c
> @@ -13,2 +12,2 @@
> -** clz w0, w0
> -** csinc w0, wzr, w0, eq
> +** rbit (w[0-9]+), w1
> +** clz \1, \1
`clz (w[0-9]+), \1`
And then:
`csinc w0, wzr, \2, eq`
So you don't need to depend on the register that is allocated to clz to be the
same.
> +++ gcc/testsuite/gcc.target/aarch64/ffs.c
> @@ -13,2 +12,2 @@
> -** clz w0, w0
> -** csinc w0, wzr, w0, eq
> +** rbit (w[0-9]+), w1
> +** clz \1, \1
Makes sense. Thanks!
> +++ gcc/testsuite/gcc.target/aarch64/ffs.c
> @@ -28,1 +26,3 @@
> -** csinc x0, xzr, x0, eq
> +** rbit (x[0-9]+), x1
> +** clz \1, \1
> +** csinc x0, xzr, \1, eq
Likewise.
On 2026-07-30 16:59:53+00:00, Drea Pinski (pinskia) <[email protected]>
approved the changes:
On 2026-07-30 17:15:32+00:00, Christopher Bazley (chris.bazley) wrote:
@pinskia Sorry for the churn but you inspired further changes along the lines
you requested.
On 2026-07-30 17:17:13+00:00, Drea Pinski (pinskia) <[email protected]>
approved the changes:
On 2026-09-01 09:27:21+00:00, Christopher Bazley (chris.bazley) wrote:
commit 32657f29f918712ad7110bd54d8ebb3bf6b0a2a8 (HEAD -> relax-aarch64-tests,
upstream/trunk)