]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make SVE tests work with --with-cpu
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 15 Apr 2021 15:18:25 +0000 (16:18 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 15 Apr 2021 15:18:25 +0000 (16:18 +0100)
commitff1912238e28ed204570e0d33d3c3517491caf0f
tree80ed862234e6734a0ac85df7010f00ad68f9a4aa
parentca7d451d985b31a0b593b50115971e70ae0767da
Make SVE tests work with --with-cpu

A lot of the SVE assembly tests are for generic-tuned SVE codegen
and so can fail when run on a toolchain configured with --with-cpu.

This could easily be solved by forcing -mtune=generic, like we already
do for -moverride=tune=none.  However, the testsuite also has some
useful execution tests that it would be better to run with as
few flag changes as possible.  Also, the flags in $sve_flags are
printed as part of the test results, so each change to $sve_flags
results in a change to the test summaries.

This patch instead intercepts dg-options and tailors the list
of additional options based on what the test is trying to do.
It also gets rid of DEFAULT_CFLAGS, which are never useful
for these tests.

gcc/testsuite/
* lib/gcc-defs.exp (aarch64-arch-dg-options): New procedure.
(aarch64-with-arch-dg-options): Likewise.
* g++.target/aarch64/sve/aarch64-sve.exp: Run the tests inside
aarch64-with-arch-dg-options.  Move the default architecture
flags to the final dg-runtest argument.
* gcc.target/aarch64/sve/aarch64-sve.exp: Likewise.  Dispense with
DEFAULT_CFLAGS.
* gcc.target/aarch64/sve2/aarch64-sve2.exp: Likewise.
gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp
gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp
gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp
gcc/testsuite/lib/gcc-defs.exp