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 v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions
Date: Tue, 6 Sep 2022 12:19:06 -0500	[thread overview]
Message-ID: <20220906171906.GF25951@gate.crashing.org> (raw)
In-Reply-To: <ba85204e-3e01-4762-b6f5-7e1adc1282cc@linux.ibm.com>

Hi!

On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote:
> On 2/9/2022 下午 11:56, Segher Boessenkool wrote:
> >> -  const signed long __builtin_vsx_scalar_extract_exp (double);
> >> +  const unsigned long long __builtin_vsx_scalar_extract_exp (double);
> >>      VSEEDP xsxexpdp {}
> >>
> >> -  const signed long __builtin_vsx_scalar_extract_sig (double);
> >> +  const unsigned long long __builtin_vsx_scalar_extract_sig (double);
> >>      VSESDP xsxsigdp {}
> > This also brings these legacy builtins in line with the vec_ versions,
> > which are the preferred builtins (they are defined in the PVIPR).
> 
> The return type of vec_ version built-ins are different than their definition
> in PVIPR. In PVIPR, they're vector unsigned int or vector unsigned long long.
> Shall we correct them?
> 
>   const vd __builtin_vsx_extract_exp_dp (vd);
>     VEEDP xvxexpdp {}
> 
>   const vf __builtin_vsx_extract_exp_sp (vf);
>     VEESP xvxexpsp {}
> 
>   const vd __builtin_vsx_extract_sig_dp (vd);
>     VESDP xvxsigdp {}
> 
>   const vf __builtin_vsx_extract_sig_sp (vf);
>     VESSP xvxsigsp {}

Those are the vsx_ versions.  I'm not sure what you're asking.

It won't be easy at all to change types from vector integer to vector
float, it will break all over.  A compatibility nightmare.  It is better
if you can show the current stuff cannot ever work, it's not a problem
to replace it in that case.

> >> --- 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-do compile { target { powerpc*-*-linux* } } } */
> > Why?
> The powerpc*-*-linux* is no need as bfp.exp excludes AIX and Darwin.
> I will modify it.

And powerpc*-*-* is guaranteed in all of gcc.target/powerpc/, so you
need no target clause at all here.

> >>  /* { dg-options "-mdejagnu-cpu=power9" } */
> >> +/* { dg-additional-options "-mpowerpc64" } */
> >> +/* { dg-require-effective-target has_arch_ppc64 } */
> > This is guaranteed already by that -mpowerpc64.
> > 
> > It probably is best if you do not add -mpowerpc64 at all.  That solves
> > both problems, is simpler, and gives better coverage as well :-)
> > 
> > So just use has_arch_ppc64 instead of lp64.  That makes it run on a
> > strict superset of cases :-)
> We commonly do regression test with -m32 and -m64. So if -mpowerpc64 is
> not added, the combination of "-m32/-mpowerpc64" is not tested.

make -k -j60 check RUNTESTFLAGS="--target_board=unix'{-m64,-m32,-m32/-mpowerpc64}'"

It is fine to not test -m32/-mpowerpc64 so often, and certaionly not
something I will ask everyone to always do :-)


Segher

  reply	other threads:[~2022-09-06 17:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02  8:31 HAO CHEN GUI
2022-09-02 15:56 ` Segher Boessenkool
2022-09-05  6:36   ` HAO CHEN GUI
2022-09-06 17:19     ` Segher Boessenkool [this message]
2022-09-07 13:51       ` Paul A. Clarke
2022-09-07 14:25         ` Segher Boessenkool
2022-09-08  5:59           ` HAO CHEN GUI
2022-09-09 17:17             ` Segher Boessenkool
2022-09-13  2:13               ` HAO CHEN GUI
2022-09-13  2:34       ` HAO CHEN GUI
2022-09-13  7:08         ` Iain Sandoe

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=20220906171906.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).