public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Bill Schmidt <wschmidt@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH, committed] rs6000: Fix test_mffsl.c effective target check
Date: Fri, 26 Nov 2021 11:46:59 -0600	[thread overview]
Message-ID: <20211126174659.GS614@gate.crashing.org> (raw)
In-Reply-To: <7dd2d61c-7f29-6d03-2f61-35eed745bc0a@linux.ibm.com>

Hi!

On Tue, Nov 23, 2021 at 01:14:05PM -0600, Bill Schmidt wrote:
> Paul Clarke pointed out to me that I had wrongly used a compile-time check
> instead of a run-time check in this executable test.  This patch fixes
> that.  I also fixed a typo in a string that caught my eye.
> 
> Tested on powerpc64le-linux-gnu, committed as obvious.

Thanks.

> --- a/gcc/testsuite/gcc.target/powerpc/test_mffsl.c
> +++ b/gcc/testsuite/gcc.target/powerpc/test_mffsl.c
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target { powerpc*-*-* } } } */

(The target clause is redundant fwiw, feel free to remove it).

>  /* { dg-options "-O2 -std=c99 -mcpu=power9" } */
> -/* { dg-require-effective-target powerpc_p9vector_ok } */
> +/* { dg-require-effective-target p9vector_hw } */

This selector doesn't make too much sense, since nothing in here
requires vectors at all.  p9modulo_hw makes more sense.  Except the
name of that should just be power9_hw :-)

The OS can disallow vector insns (MSR[VEC] and/or MSR[VSX]), so
p9vector_hw tests it isn't doing that, and that the hardware is a p9.
p9modulo_hw does only the latter, and we have no reason to check
separately if we can run modulo insns anyway :-)

So please change the test here.  And bonus points if you can rename
p9modulo_hw and _ok (in a separate patch of course).


Segher

      reply	other threads:[~2021-11-26 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 19:14 Bill Schmidt
2021-11-26 17:46 ` Segher Boessenkool [this message]

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=20211126174659.GS614@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=wschmidt@linux.ibm.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).