There isn't a 1:1 mapping from SVE intrinsics to SVE instructions,
but the intrinsics are still close enough to the instructions for
there to be a specific preferred sequence (or sometimes choice of
preferred sequences) for a given combination of operands.  Sometimes
these sequences will be one instruction, sometimes they'll be several.
I therefore wanted a convenient way of matching the exact assembly
implementation of a given function.  It's possible to do that using
single scan-assembler lines, but:
(a) they become hard to read for multiline matches
(b) the PASS/FAIL lines tend to be overly long
(c) it's useful to have a single place that skips over uninteresting
    lines, such as entry block labels and .cfi_* directives, without
    being overly broad
This patch therefore adds a new check-function-bodies dg-final test
that looks for specially-formatted comments.  As a demo, the patch
converts the SVE vec_init tests to use the new harness instead of
scan-assembler.
The regexps in parse_function_bodies are fairly general, but might
still need to be extended in future for targets like Darwin or AIX.
2019-07-29  Richard Sandiford  <richard.sandiford@arm.com>
gcc/
	* doc/sourcebuild.texi (check-function-bodies): Document.
gcc/testsuite/
	* lib/scanasm.exp (parse_function_bodies, check_function_body)
	(check-function-bodies): New procedures.
	* gcc.target/aarch64/sve/init_1.c: Use check-function-bodies
	instead of scan-assembler.
	* gcc.target/aarch64/sve/init_2.c: Likewise.
	* gcc.target/aarch64/sve/init_3.c: Likewise.
	* gcc.target/aarch64/sve/init_4.c: Likewise.
	* gcc.target/aarch64/sve/init_5.c: Likewise.
	* gcc.target/aarch64/sve/init_6.c: Likewise.
	* gcc.target/aarch64/sve/init_7.c: Likewise.
	* gcc.target/aarch64/sve/init_8.c: Likewise.
	* gcc.target/aarch64/sve/init_9.c: Likewise.
	* gcc.target/aarch64/sve/init_10.c: Likewise.
	* gcc.target/aarch64/sve/init_11.c: Likewise.
	* gcc.target/aarch64/sve/init_12.c: Likewise.
From-SVN: r273869
| Name | Last commit | Last update | 
|---|---|---|
| .. | ||
| asan-dg.exp | Loading commit data... | |
| atomic-dg.exp | Loading commit data... | |
| brig-dg.exp | Loading commit data... | |
| brig.exp | Loading commit data... | |
| c-compat.exp | Loading commit data... | |
| c-torture.exp | Loading commit data... | |
| clearcap.exp | Loading commit data... | |
| compat.exp | Loading commit data... | |
| copy-file.exp | Loading commit data... | |
| dejapatches.exp | Loading commit data... | |
| dg-pch.exp | Loading commit data... | |
| file-format.exp | Loading commit data... | |
| fortran-modules.exp | Loading commit data... | |
| fortran-torture.exp | Loading commit data... | |
| g++-dg.exp | Loading commit data... | |
| g++.exp | Loading commit data... | |
| gcc-defs.exp | Loading commit data... | |
| gcc-dg.exp | Loading commit data... | |
| gcc-gdb-test.exp | Loading commit data... | |
| gcc-simulate-thread.exp | Loading commit data... | |
| gcc.exp | Loading commit data... | |
| gcov.exp | Loading commit data... | |
| gdc-dg.exp | Loading commit data... | |
| gdc.exp | Loading commit data... | |
| gfortran-dg.exp | Loading commit data... | |
| gfortran.exp | Loading commit data... | |
| gnat-dg.exp | Loading commit data... | |
| gnat.exp | Loading commit data... | |
| go-dg.exp | Loading commit data... | |
| go-torture.exp | Loading commit data... | |
| go.exp | Loading commit data... | |
| lto.exp | Loading commit data... | |
| mike-g++.exp | Loading commit data... | |
| mike-gcc.exp | Loading commit data... | |
| multiline.exp | Loading commit data... | |
| obj-c++-dg.exp | Loading commit data... | |
| obj-c++.exp | Loading commit data... | |
| objc-dg.exp | Loading commit data... | |
| objc-torture.exp | Loading commit data... | |
| objc.exp | Loading commit data... | |
| options.exp | Loading commit data... | |
| plugin-support.exp | Loading commit data... | |
| profopt.exp | Loading commit data... | |
| prune.exp | Loading commit data... | |
| scanasm.exp | Loading commit data... | |
| scandump.exp | Loading commit data... | |
| scanipa.exp | Loading commit data... | |
| scanlang.exp | Loading commit data... | |
| scanltranstree.exp | Loading commit data... | |
| scanoffloadrtl.exp | Loading commit data... | |
| scanoffloadtree.exp | Loading commit data... | |
| scanrtl.exp | Loading commit data... | |
| scantree.exp | Loading commit data... | |
| scanwpaipa.exp | Loading commit data... | |
| target-libpath.exp | Loading commit data... | |
| target-supports-dg.exp | Loading commit data... | |
| target-supports.exp | Loading commit data... | |
| target-utils.exp | Loading commit data... | |
| timeout-dg.exp | Loading commit data... | |
| timeout.exp | Loading commit data... | |
| torture-options.exp | Loading commit data... | |
| tsan-dg.exp | Loading commit data... | |
| ubsan-dg.exp | Loading commit data... | |
| wrapper.exp | Loading commit data... |