From: Jeff Law <law@redhat.com>
To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: Add dg test for matching function bodies
Date: Sun, 21 Jul 2019 20:16:00 -0000 [thread overview]
Message-ID: <25cab1cd-acb1-e1e0-41ae-a7f53786d08b@redhat.com> (raw)
In-Reply-To: <mpt4l3m848u.fsf@arm.com>
On 7/16/19 8:04 AM, Richard Sandiford wrote:
> 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 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.
>
> Tested on aarch64-linux-gnu (and x86_64-linux-gnu, somewhat pointlessly
> given the contents of the patch). OK to install?
>
> Richard
>
>
> 2019-07-16 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.
OK
jeff
next prev parent reply other threads:[~2019-07-21 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 14:14 Richard Sandiford
2019-07-21 20:16 ` Jeff Law [this message]
2023-09-04 21:05 ` [WIP] testsuite: Port 'check-function-bodies' to nvptx (was: Add dg test for matching function bodies) Thomas Schwinge
2023-09-05 12:20 ` Thomas Schwinge
2023-09-05 14:28 ` testsuite: Port 'check-function-bodies' to nvptx Richard Sandiford
2023-09-12 8:45 ` Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25cab1cd-acb1-e1e0-41ae-a7f53786d08b@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).