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 v2, rs6000] Put dg-options before effective target checks
Date: Thu, 1 Sep 2022 11:07:58 -0500 [thread overview]
Message-ID: <20220901160758.GF25951@gate.crashing.org> (raw)
In-Reply-To: <20055172-6ec9-6055-c02a-9f91b26e0296@linux.ibm.com>
On Thu, Sep 01, 2022 at 01:30:18PM +0800, HAO CHEN GUI wrote:
> --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c
> @@ -1,6 +1,10 @@
> -/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */
> +/* { dg-do compile } */
> +/* { dg-options "-O2 -mdejagnu-cpu=power9 -mvsx" } */
-mcpu=power9 already implies -mvsx. If you would keep -mvsx, that
belongs *after* testing powerpc_vsx_ok.
> +/* { dg-require-effective-target has_arch_ppc64 } */
> +/* { dg-require-effective-target int128 } */
> /* { dg-require-effective-target powerpc_vsx_ok } */
> -/* { dg-options "-O2 -mvsx" } */
> +/* The test case can be compiled on all platforms with compiling option
> + -mdejagnu-cpu=power9. */
Please don't put in comments like this: that is what the code already
*does*, after all :-)
> --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c
> @@ -1,6 +1,8 @@
> -/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */
> -/* { dg-require-effective-target powerpc_vsx_ok } */
> /* { dg-options "-O2 -mvsx" } */
You cannot add -mvsx without first testing powerpc_vsx_ok (unless it is
guaranteed some other way of course; here, it isn't).
> +/* { dg-do compile { target { ! has_arch_pwr9 } } } */
Please keep dg-do first thing in the file.
> --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c
> @@ -1,5 +1,6 @@
> -/* { dg-do compile { target has_arch_ppc64 } } */
> +/* { dg-do compile } */
> /* { dg-options "-mdejagnu-cpu=power6 -O2" } */
> +/* { dg-require-effective-target has_arch_ppc64 } */
This is fine, but it doesn't change anything, unless we have a bug.
Segher
next prev parent reply other threads:[~2022-09-01 16:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 5:30 HAO CHEN GUI
2022-09-01 9:34 ` Kewen.Lin
2022-09-02 3:23 ` HAO CHEN GUI
2022-09-02 4:12 ` Kewen.Lin
2022-09-01 16:07 ` Segher Boessenkool [this message]
2022-09-02 3:43 ` HAO CHEN GUI
2022-09-02 20:49 ` Segher Boessenkool
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=20220901160758.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).