public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: "Maciej W. Rozycki" <macro@embecosm.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] RISC-V/testsuite: Widen coverage for pr105314.c
Date: Fri, 12 Jan 2024 17:54:00 +0800	[thread overview]
Message-ID: <CA+yXCZAdS=bBWEUUx2iMcvP_fxUN+SnjuEuE-Terk+jc4qGUUg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.2401112306560.5892@tpp.orcam.me.uk>

LGTM

On Fri, Jan 12, 2024 at 7:36 AM Maciej W. Rozycki <macro@embecosm.com> wrote:
>
> The optimization levels pr105314.c is iterated over are needlessly
> overridden with "-O2", limiting the coverage of the test case to that
> level, perhaps with additional options the original optimization level
> has been supplied with.  We could prevent the extra iterations other
> than "-O2" from being run, but the transformation made by if-conversion
> is also expected to happen at other optimization levels, so include them
> all, and also make sure no reverse-condition branch appears in output,
> moving the `dg-final' command to the bottom, as with most test cases.
>
>         gcc/testsuite/
>         * gcc.target/riscv/pr105314.c: Replace `dg-options' command with
>         `dg-skip-if'.  Also reject "bne" with `dg-final'.
> ---
> Hi,
>
>  Technically it's not a single self-contained change and it could be 3
> instead, but I think there's little point in splitting it further.
>
>   Maciej
> ---
>  gcc/testsuite/gcc.target/riscv/pr105314.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> gcc-test-riscv-pr105314-levels.diff
> Index: gcc/gcc/testsuite/gcc.target/riscv/pr105314.c
> ===================================================================
> --- gcc.orig/gcc/testsuite/gcc.target/riscv/pr105314.c
> +++ gcc/gcc/testsuite/gcc.target/riscv/pr105314.c
> @@ -1,7 +1,6 @@
>  /* PR rtl-optimization/105314 */
>  /* { dg-do compile } */
> -/* { dg-options "-O2" } */
> -/* { dg-final { scan-assembler-not "\tbeq\t" } } */
> +/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-Os" "-Oz" } } */
>
>  long
>  foo (long a, long b, long c)
> @@ -10,3 +9,5 @@ foo (long a, long b, long c)
>      a = 0;
>    return a;
>  }
> +
> +/* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */

  reply	other threads:[~2024-01-12  9:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 23:35 [PATCH 0/2] RISC-V/testsuite: A couple of improvements " Maciej W. Rozycki
2024-01-11 23:35 ` [PATCH 1/2] RISC-V/testsuite: Widen coverage " Maciej W. Rozycki
2024-01-12  9:54   ` Kito Cheng [this message]
2024-01-11 23:35 ` [PATCH 2/2] RISC-V/testsuite: Also verify if-conversion runs " Maciej W. Rozycki
2024-01-12  9:53   ` Kito Cheng
2024-01-12 10:04   ` Andrew Pinski
2024-01-12 13:59     ` Maciej W. Rozycki
2024-01-16 14:22       ` Jeff Law
2024-01-16 15:33         ` Maciej W. Rozycki
2024-01-24 11:26           ` Maciej W. Rozycki
2024-01-24 17:24             ` Jeff Law
2024-01-26 21:49               ` Maciej W. Rozycki

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='CA+yXCZAdS=bBWEUUx2iMcvP_fxUN+SnjuEuE-Terk+jc4qGUUg@mail.gmail.com' \
    --to=kito.cheng@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=macro@embecosm.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).