public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: HAO CHEN GUI <guihaoc@linux.ibm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, David <dje.gcc@gmail.com>,
	"Kewen.Lin" <linkw@linux.ibm.com>,
	Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions
Date: Thu, 25 Aug 2022 10:17:59 -0500	[thread overview]
Message-ID: <20220825151759.GF25951@gate.crashing.org> (raw)
In-Reply-To: <d88d1bef-03c6-4f5c-586b-feb83dcec372@linux.ibm.com>

On Wed, Aug 24, 2022 at 01:11:39PM +0800, HAO CHEN GUI wrote:
> On 23/8/2022 下午 10:26, Segher Boessenkool wrote:
> > On Fri, Aug 19, 2022 at 10:35:54AM +0800, HAO CHEN GUI wrote:
> >> --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c
> >> +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c
> >> @@ -1,7 +1,8 @@
> >>  /* { dg-do compile { target { powerpc*-*-* } } } */
> >> -/* { dg-require-effective-target lp64 } */
> >> -/* { dg-require-effective-target powerpc_p9vector_ok } */
> >>  /* { dg-options "-mdejagnu-cpu=power9" } */
> >> +/* { dg-additional-options "-mpowerpc64" { target { powerpc*-*-linux* && ilp32 } } } */
> > 
> > You can add this always.  It is default on 64-bit systems, but it is
> > simpler to just always add it:
> > /* { dg-additional-options "-mpowerpc64" } */
> > 
> > Or are there subtargets that will error on this?
> Yes, AIX fails if TARGET_POWERPC64 is set and TARGET_64BIT is not set.
> So I add "-mpowerpc64" for Linux 32-bit environment.

Aha.  But you can add it for all linux:

/* { dg-additional-options "-mpowerpc64" { target powerpc*-*-linux* } } */

(or *-*-linux* even, everything in gcc.target/powerpc is known to be
powerpc*-*-* already).

Not that it matters at all here, as the other thread shows :-), but for
the future: run testcases wherever possible (and reasonable), and in the
same vein, try not to specialise option when you do not have to.  Doing
this makes testing much less work, makes it easier to have reasonable
coverage.


Segher

      parent reply	other threads:[~2022-08-25 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  2:35 HAO CHEN GUI
2022-08-19  3:01 ` Kewen.Lin
2022-08-19  6:09   ` HAO CHEN GUI
2022-08-23 14:26 ` Segher Boessenkool
2022-08-24  5:11   ` HAO CHEN GUI
2022-08-24  5:24     ` Kewen.Lin
2022-08-24  6:31       ` HAO CHEN GUI
2022-08-25  3:37       ` HAO CHEN GUI
2022-08-25  5:22         ` Kewen.Lin
2022-08-25 14:01           ` David Edelsohn
2022-08-26  2:42             ` HAO CHEN GUI
2022-08-26  2:51               ` Kewen.Lin
2022-08-26 13:32               ` David Edelsohn
2022-08-25 15:17     ` 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=20220825151759.GF25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=guihaoc@linux.ibm.com \
    --cc=linkw@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).