public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Tamar Christina <tamar.christina@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Sandiford <richard.sandiford@arm.com>, nd <nd@arm.com>
Subject: Re: [PATCH 1/4][committed] testsuite: Fix testisms in scalar tests PR101457
Date: Thu, 15 Jul 2021 19:20:59 -0700	[thread overview]
Message-ID: <CAMe9rOqRKzamzAPp42rx4O2e-3koDfiSXa7VoZ+jXf3Zyybk6Q@mail.gmail.com> (raw)
In-Reply-To: <patch-14658-tamar@arm.com>

On Thu, Jul 15, 2021 at 9:40 AM Tamar Christina via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi All,
>
> These testcases accidentally contain the wrong signs for the expected values
> for the scalar code.  The vector code however is correct.
>
> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
>
> Committed as a trivial fix.
>
> Thanks,
> Tamar
>
> gcc/testsuite/ChangeLog:
>
>         PR middle-end/101457
>         * gcc.dg/vect/vect-reduc-dot-17.c: Fix signs of scalar code.
>         * gcc.dg/vect/vect-reduc-dot-18.c: Likewise.
>         * gcc.dg/vect/vect-reduc-dot-22.c: Likewise.
>         * gcc.dg/vect/vect-reduc-dot-9.c: Likewise.
>
> --- inline copy of patch --
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c
> index aa269c4d657f65e07e36df7f3fd0098cf3aaf4d0..38f86fe458adcc7ebbbae22f5cc1e720928f2d48 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c
> @@ -35,8 +35,9 @@ main (void)
>  {
>    check_vect ();
>
> -  SIGNEDNESS_3 char a[N], b[N];
> -  int expected = 0x12345;
> +  SIGNEDNESS_3 char a[N];
> +  SIGNEDNESS_4 char b[N];
> +  SIGNEDNESS_1 int expected = 0x12345;
>    for (int i = 0; i < N; ++i)
>      {
>        a[i] = BASE + i * 5;
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c
> index 2b1cc0411c3256ccd876d8b4da18ce4881dc0af9..2e86ebe3c6c6a0da9ac242868592f30028ed2155 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c
> @@ -35,8 +35,9 @@ main (void)
>  {
>    check_vect ();
>
> -  SIGNEDNESS_3 char a[N], b[N];
> -  int expected = 0x12345;
> +  SIGNEDNESS_3 char a[N];
> +  SIGNEDNESS_4 char b[N];
> +  SIGNEDNESS_1 int expected = 0x12345;
>    for (int i = 0; i < N; ++i)
>      {
>        a[i] = BASE + i * 5;
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c
> index febeb19784c6aaca72dc0871af0d32cc91fa6ea2..0bde43a6cb855ce5edd9015ebf34ca226353d77e 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c
> @@ -37,7 +37,7 @@ main (void)
>
>    SIGNEDNESS_3 char a[N];
>    SIGNEDNESS_4 short b[N];
> -  int expected = 0x12345;
> +  SIGNEDNESS_1 long expected = 0x12345;

Does it work with long == int? I still got

FAIL: gcc.dg/vect/vect-reduc-dot-22.c -flto -ffat-lto-objects
scan-tree-dump-not vect "vect_recog_dot_prod_pattern: detected"
FAIL: gcc.dg/vect/vect-reduc-dot-22.c scan-tree-dump-not vect
"vect_recog_dot_prod_pattern: detected"

with -m32 on Linux/x86-64.

>    for (int i = 0; i < N; ++i)
>      {
>        a[i] = BASE + i * 5;
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c
> index cbbeedec3bfd0810a8ce8036e6670585d9334924..d1049c96bf1febfc8933622e292b44cc8dd129cc 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c
> @@ -35,8 +35,9 @@ main (void)
>  {
>    check_vect ();
>
> -  SIGNEDNESS_3 char a[N], b[N];
> -  int expected = 0x12345;
> +  SIGNEDNESS_3 char a[N];
> +  SIGNEDNESS_4 char b[N];
> +  SIGNEDNESS_1 int expected = 0x12345;
>    for (int i = 0; i < N; ++i)
>      {
>        a[i] = BASE + i * 5;
>
>
> --


-- 
H.J.

  parent reply	other threads:[~2021-07-16  2:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 16:39 Tamar Christina
2021-07-15 16:39 ` [PATCH 2/4]AArch64: correct usdot vectorizer and intrinsics optabs Tamar Christina
2021-07-15 19:34   ` Richard Sandiford
2021-07-20 12:34     ` Tamar Christina
2021-07-20 16:15       ` Richard Sandiford
2021-07-22 11:50         ` Tamar Christina
2021-07-22 18:09           ` Richard Sandiford
2021-07-15 16:40 ` [PATCH 3/4]AArch64: correct dot-product RTL patterns for aarch64 Tamar Christina
2021-07-15 19:44   ` Richard Sandiford
2021-07-22 11:51     ` Tamar Christina
2021-07-22 18:11       ` Richard Sandiford
2021-07-23  8:14         ` Tamar Christina
2021-07-26 13:56           ` Richard Sandiford
2021-07-15 16:40 ` [PATCH 4/4][AArch32]: correct dot-product RTL patterns Tamar Christina
2021-07-16  2:20 ` H.J. Lu [this message]
2021-07-16  8:42   ` [PATCH 1/4][committed] testsuite: Fix testisms in scalar tests PR101457 Tamar Christina

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=CAMe9rOqRKzamzAPp42rx4O2e-3koDfiSXa7VoZ+jXf3Zyybk6Q@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    --cc=richard.sandiford@arm.com \
    --cc=tamar.christina@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).